Opened 12 years ago
Closed 10 years ago
#4921 closed Bugs (fixed)
BOOST_THREAD_USE_DLL and BOOST_THREAD_USE_LIB are crucial and need to be documented
Reported by: | 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 |
Description
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.
Change History (8)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
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 by , 12 years ago
Cc: | added |
---|---|
Milestone: | Boost 1.46.0 → Boost 1.47.0 |
Version: | Boost 1.45.0 → Boost Development Trunk |
comment:4 by , 12 years ago
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 by , 11 years ago
Cc: | added |
---|---|
Milestone: | Boost 1.47.0 → To Be Determined |
Owner: | changed from | to
Status: | new → assigned |
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.
comment:6 by , 11 years ago
Milestone: | To Be Determined → Boost 1.49.0 |
---|
Committed in trunk revision #75905.
comment:8 by , 10 years ago
Milestone: | Boost 1.49.0 → Boost 1.50.0 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Committed in release branch at [78543]
...and they should have a line in thread's doc's table of contents.