To make a long story short: I compiled boost from source, and it worked, so I suspect either a problem with the package or, more likely, some file got corrupted while I downloaded or installed.

I don't explicitly link with any library. I just indicate in VS where to look for libraries. It worked for years when compiling with 32-bit libraries, and it worked after I used the boost 64-bit library that I compiled myself, but didn't using the pre-built package that I downloaded. Only difference is that the pre-built one I downladed is 1.53, everything else was 1.51 and (sometimes much) earlier.

Thanks for your help.

a



2013/2/7 Vicente J. Botet Escriba <vicente.botet@wanadoo.fr>
Le 06/02/13 21:56, Alain Leblanc a écrit :
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.
Are you linking with boost_system?

best,
Vicente

_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users