Hi,
I'm having some issues linking my code with the 64-bit version
of boost 1.51 on windows with VC 10. I managed to write this
small example that illustrates my problem. It is a project to
create a DLL. I downloaded from
boostpro.com.
Here's the code:
#include <boost/regex.hpp>
#include <boost/filesystem.hpp>
void useBoost() {
}
and the result.
------ Build started: Project: test-64, Configuration: Release
x64 ------
UsesRegex.cpp
UsesRegex.obj : error LNK2001: unresolved external symbol
"class boost::system::error_category const & __cdecl
boost::system::system_category(void)"
(?system_category@system@boost@@YAAEBVerror_category@12@XZ)
UsesRegex.obj : error LNK2001: unresolved external symbol
"class boost::system::error_category const & __cdecl
boost::system::generic_category(void)"
(?generic_category@system@boost@@YAAEBVerror_category@12@XZ)
C:\Users\aleblanc\projects\trunk\XDE\sandbox\alain\c-testing\test-64\x64\Release\test-64.dll
: fatal error LNK1120: 2 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0
skipped ==========
However, if I comment out the include for filesystem.hpp it
compiles ok. I have included the path to the boost libraries
in the 'Additional Library Directories' property for the
linker. otherwise it complains about not finding the library
for boost_regex. Compiling for 32 bit (with the path for the
libraries to a 32-bit installation of boost) works fine.
Any suggestion would be appreciated.