How to use Boost libs from projects?
I have project compiled as Debug,x64. And boost 1.63 compiled by: - bootstrap.bat - b2 variant=debug,release link=static runtime-link=static address-model=64 In project I have cpp files with #include "boost/filesystem.hpp" and when compile project I have error: cannot open file 'libboost_filesystem-vc140-mt-gd-1_61.lib' whereas in c:\boost\stage\lib\ I have libboost_filesystem-vc140-mt-sgd-1_63.lib but not libboost_filesystem-vc140-mt-gd-1_61.lib and in VS2015 project I have no Boost lib. (sorry for my English)
2016-12-31 7:37 GMT-05:00 Andy
I have project compiled as Debug,x64. And boost 1.63 compiled by: - bootstrap.bat - b2 variant=debug,release link=static runtime-link=static address-model=64 In project I have cpp files with #include "boost/filesystem.hpp" and when compile project I have error: cannot open file 'libboost_filesystem-vc140-mt-gd-1_61.lib' whereas in c:\boost\stage\lib\ I have libboost_filesystem-vc140-mt-sgd-1_63.lib but not libboost_filesystem-vc140-mt-gd-1_61.lib and in VS2015 project I have no Boost lib.
(sorry for my English)
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
You probably have an include path pointing to version 1.61 of boost somewhere in your project. you might have added the path to 1.63 after the path to 1.61. -- Daniel *L'action accède à la perfection quand, bien que vivant, vous êtes déjà mort* *Bunan*
Where I can change it? I have deleted BlockNew.VC.db BlockNew.vcxproj : <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <LinkIncremental>true</LinkIncremental> <IncludePath>bitdev;c:\boost;c:\Program Files\MySQL\Connector.C++ 1.1\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath> <LibraryPath>c:\boost\stage\lib;c:\Program Files\MySQL\Connector.C++ 1.1\lib\opt;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(NETFXKitsDir)Lib\um\x64</LibraryPath> </PropertyGroup>
2016-12-31 14:29 GMT-05:00 Andy
Where I can change it? I have deleted BlockNew.VC.db BlockNew.vcxproj : <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <LinkIncremental>true</LinkIncremental> <IncludePath>bitdev;c:\boost;c:\Program Files\MySQL\Connector.C++ 1.1\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath> <LibraryPath>c:\boost\stage\lib;c:\Program Files\MySQL\Connector.C++ 1.1\lib\opt;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_ x64);$(NETFXKitsDir)Lib\um\x64</LibraryPath> </PropertyGroup>
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
I'm not familiar enough with visual studio. but looking at your include path you have : c:\boost are you sure it's the version you want ? then you have $(VC_IncludePath), what is it ? it can expand too many directories. -- Daniel *L'action accède à la perfection quand, bien que vivant, vous êtes déjà mort* *Bunan*
On 31/12/2016 12:37, Andy wrote:
I have project compiled as Debug,x64. And boost 1.63 compiled by: - bootstrap.bat - b2 variant=debug,release link=static runtime-link=static address-model=64 In project I have cpp files with #include "boost/filesystem.hpp" and when compile project I have error: cannot open file 'libboost_filesystem-vc140-mt-gd-1_61.lib' whereas in c:\boost\stage\lib\ I have libboost_filesystem-vc140-mt-sgd-1_63.lib but not libboost_filesystem-vc140-mt-gd-1_61.lib and in VS2015 project I have no Boost lib.
Looks to me like you have Boost-1.61 in your include path, and not your new 1.63 install.
After deleting obj files: cannot open file libboost_filesystem-vc140-mt-gd-1_63.lib whereas is file libboost_filesystem-vc140-mt-sgd-1_63.lib Is 64-bit lib and wants 32-bit lib? or "s" means "static"?
On 1 January 2017 at 12:25, Andy
or "s" means "static"?
Yes, like in static c-runtime-library (crt) linkage (it's not about whether the boost libs themselves are dll's or lib's!)... i.e. You'll need to build your app /MT(d), not /MD(d), or (re-)compile boost linked to the dynamic crt. Your app will (in principle) need to have the same (type of) linkage to the crt as the libs you are linking to. Happy new-year, degski
Thanks, how to recompile boost linked to the dynamic crt? b2 variant=debug,release link=dynamic runtime-link=dynamic address-model=64 ?
participants (4)
-
Andy
-
Daniel Anderson
-
degski
-
John Maddock