Reputation: 407
I would like to build my program on x86 Windows 7, which used the boost library. After reading the following post I tried to build boost and compile my program in debug mode. The output dialog in Visual Studio 2010 throws the following errors:
error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::system_category(void)" (?system_category@system@boost@@YAABVerror_category@12@XZ)
...
I've used the following build commands to build boost:
bjam --build-dir=c:\boost --build-type=complete --toolset=msvc-10.0 address-model=64 architecture=x86 -j 4
Note: command --with-system
is not working for me.
My Project Settings are: Project->Properties->C/C++->General->Additional Include Directories: D:\boost\boost_1_57_0;%(AdditionalIncludeDirectories)
and Project->Properties->Linker->General->Additional Library Directories: D:\boost\boost_1_57_0\stage\lib
How can I solve the unresolved external symbol errors?
Upvotes: 1
Views: 4468
Reputation: 407
I've solved the problem. I've recompiled the boost library 1.57 with the following command: b2 toolset=msvc-10.0 --build-type=complete --libdir=C:\boost\lib\x64 architecture=x86 address-model=64 install
. Maybe, you should add the argument j%NUMBER_OF_PROCESSORS%
to speed up the compile process.
Note:
The main different to the command in my question is, that I use in this case b2
instead of bjam
.
Upvotes: 2