Modify

Ticket #2392 (closed Bugs: fixed)

Opened 6 years ago

Last modified 6 years ago

[tr1][spirit][hash] Boost trunk +VC9 - autolinking libboost_math

Reported by: Richard Webb <Richard.Webb@…> Owned by: johnmaddock
Milestone: Boost 1.37.0 Component: TR1
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

As described @  http://thread.gmane.org/gmane.comp.lib.boost.devel/180769:

Adding the <boost/tr1/tr1> directory to the include path and then building a project that includes headers such as <boost/functional/hash.hpp> or <boost/spirit/include/classic_core.hpp> results in it trying to autolink to libboost_math_c99-vc90-mt-gd-1_37.lib.

Doesn't seem like it should be doing that?

Attachments

Change History

comment:1 Changed 6 years ago by johnmaddock

  • Status changed from new to assigned

Unfortunately, if you enable TR1 <cmath> support, then anything that includes that header will want to link to a TR1 library :-(

I'll look into disabling TR1 support where it clearly isn't needed however.

Cheers, John.

comment:2 Changed 6 years ago by johnmaddock

  • Status changed from assigned to closed
  • Resolution set to fixed

(In [49254]) Change includes of <cmath> to <boost/config/no_tr1/config.hpp>.

Previously if Boost.TR1 was in the include path then including <cmath> pulls in all the new TR1 math functions, which in turn also requires linking to an external library. With auto-linking support this requires that library to have been built and be present in the library search path, even if the actual library under use is header only.

Fixes #2392.

comment:3 Changed 6 years ago by johnmaddock

(In [49314]) Merge fixes from Trunk.

Fixes #2392.

Change includes of <cmath> to <boost/config/no_tr1/config.hpp>.

Previously if Boost.TR1 was in the include path then including <cmath> pulls in all the new TR1 math functions, which in turn also requires linking to an external library. With auto-linking support this requires that library to have been built and be present in the library search path, even if the actual library under use is header only.

View

Add a comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.