|
Boost Users : |
Subject: Re: [Boost-users] Problem linking with boost 1, 51 64-bits from boostpro, VC10
From: Didier J-P Guion Firmin (gf.didierjp_at_[hidden])
Date: 2013-02-06 16:35:37
Alain,
It looks like VS cannot find the regex library.
You must tell VS where to find it.
Project -> Properties -> Linker -> General and additional libraries
directories
Also you must add the regex library
Project -> Properties -> Linker -> Input.
Last but not least, make sure that your lib is 64 bits.
Cheers
On Wed, Feb 6, 2013 at 9:56 PM, Alain Leblanc <aalebl_at_[hidden]> wrote:
> 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 mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
-- Didier JP GF 15 Rue Albert Roussel 75017 Paris skype : bdidierjp
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