Ticket #4921 (closed Bugs: fixed)

Opened 6 years ago

Last modified 5 years ago

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.


Change History

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

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

comment:2 Changed 6 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 6 years ago by Jim Bell <jim@…>

  • Cc jim@… added
  • Version changed from Boost 1.45.0 to Boost Development Trunk
  • Milestone changed from Boost 1.46.0 to Boost 1.47.0

comment:4 Changed 6 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 5 years ago by viboes

  • Cc viboes added
  • Owner changed from anthonyw to viboes
  • Status changed from new to assigned
  • Milestone changed from Boost 1.47.0 to To Be Determined

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 5 years ago by viboes (previous) (diff)

comment:6 Changed 5 years ago by viboes

  • Milestone changed from To Be Determined to Boost 1.49.0

Committed in trunk revision #75905.

comment:7 Changed 5 years ago by viboes

Committed in trunk at revision [76543].

comment:8 Changed 5 years ago by viboes

  • Status changed from assigned to closed
  • Resolution set to fixed
  • Milestone changed from Boost 1.49.0 to Boost 1.50.0

Committed in release branch at [78543]


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

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

Note: See TracTickets for help on using tickets.