AllForum
AllForum

Reputation: 389

Building Boost.Test from sources : library libboost_unit_test_framework missing

I am building Boost from sources.
I need the library libboost_unit_test library for doing unit tests.
But this library in not generated...
I compile Boost like this :

.\bootstrap.bat
.\b2 address-model=64 runtime-link=shared link=shared variant=release stage --stagedir=./stage/x64/Release --build-dir=build/x64/Release

I should get libboost_unit_test_framework-vc140-mt-gd-x64-1_66.lib...

I cannot find how to build this library...
Can someone help me ?

Upvotes: 0

Views: 136

Answers (2)

AllForum
AllForum

Reputation: 389

Thanks Sehe : with your answer I have found.
A stupid problem :
- Libboost_unit_test_framework-vc140-mt-gd-x64-1_66.lib is for static linking.
- boost_unit_test_framework-vc140-mt-gd-x64-1_66.lib is for dynamic linking.

To use dynamic linking I have to add this define in my projet : #define BOOST_ALL_DYN_LINK
And to build the static version I have to use b2 --link=static.

Upvotes: 0

sehe
sehe

Reputation: 393114

Where are you looking for it?

The naming you used for --build-dir suggests that you might be confused about that. --build-dir indicates the place to put temporary (intermediate) objects, not the completed targets.

The targets are normally under stage/lib

Upvotes: 1

Related Questions