Boost logo

Boost Users :

Subject: [Boost-users] Problem linking with boost 1, 51 64-bits from boostpro, VC10
From: Alain Leblanc (aalebl_at_[hidden])
Date: 2013-02-06 15:56:48


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_at_system@boost@
@YAAEBVerror_category_at_12@XZ)
UsesRegex.obj : error LNK2001: unresolved external symbol "class
boost::system::error_category const & __cdecl
boost::system::generic_category(void)" (?generic_category_at_system@boost@
@YAAEBVerror_category_at_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.

Thanks,

a



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net