Opened 7 years ago

Closed 5 years ago

#4921 closed Bugs (fixed)

BOOST_THREAD_USE_DLL and BOOST_THREAD_USE_LIB are crucial and need to be documented

Reported by: Jim Bell <jim@…> Owned by: viboes
Milestone: Boost 1.50.0 Component: thread
Version: Boost Development Trunk Severity: Problem
Keywords: BOOST_THREAD_USE_DLL BOOST_THREAD_USE_LIB linking Cc: jim@…, viboes


Boost.Thread's documentation makes no reference to macros BOOST_THREAD_USE_DLL or BOOST_THREAD_USE_LIB, but they're crucial to correct building and linking on some platforms.

Attachments (0)

Change History (8)

comment:1 Changed 7 years ago by Jim Bell <jim@…>

...and they should have a line in thread's doc's table of contents.

comment:2 Changed 7 years ago by anonymous

In general boost is terrible for this sort of thing. The only way to learn about this kind of stuff is to get some some sort of cryptic error message when you try to compile your app, and then search for the compiler error in google.

comment:3 Changed 7 years ago by Jim Bell <jim@…>

Cc: jim@… added
Milestone: Boost 1.46.0Boost 1.47.0
Version: Boost 1.45.0Boost Development Trunk

comment:4 Changed 7 years ago by Jim Bell <jim@…>

And (for the sake of the search engines) needing it and not supplying it gives you errors like such:

undefined reference to `_imp___ZN5boost11this_thread18interruptible_waitEPvNS_6detail7timeoutE'
In function `~thread_group':
undefined reference to `_imp___ZN5boost6threadD1Ev'
undefined reference to `_imp___ZN5boost6thread4joinEv'
In function `thread<void (*)()>':
undefined reference to `_imp___ZN5boost6thread12start_threadEv'
In function `~auto_ptr':
undefined reference to `_imp___ZN5boost6threadD1Ev'
collect2: ld returned 1 exit status

comment:5 Changed 6 years ago by viboes

Cc: viboes added
Milestone: Boost 1.47.0To Be Determined
Owner: changed from Anthony Williams to viboes
Status: newassigned

I see that in addition Boost.Thread doesn't follows completely Automatic library selection.

It would be great to adopt the already documented way to build and use a library, document it and make the necessary adaptations on the code and bjam files.

What about this text.

Using and building the library

Boost.Thread is configured following the conventions used to build libraries with separate source code. Boost.Thread will import/export the code only if the user has specifically asked for it, by defining either BOOST_ALL_DYN_LINK if they want all boost libraries to be dynamically linked, or BOOST_THREAD_DYN_LINK if they want just this one to be dynamically liked.

The source code compiled when building the library defines a macros BOOST_THREAD_SOURCE that is used to import or export it. The user must not define this macro in any case.

Last edited 6 years ago by viboes (previous) (diff)

comment:6 Changed 6 years ago by viboes

Milestone: To Be DeterminedBoost 1.49.0

Committed in trunk revision #75905.

comment:7 Changed 6 years ago by viboes

Committed in trunk at revision [76543].

comment:8 Changed 5 years ago by viboes

Milestone: Boost 1.49.0Boost 1.50.0
Resolution: fixed
Status: assignedclosed

Committed in release branch at [78543]

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain viboes.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.