Discussion:
How to use Boost libs from projects?
(too old to reply)
Andy
2016-12-31 12:37:16 UTC
Permalink
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)
Daniel Anderson
2016-12-31 18:58:31 UTC
Permalink
Post by Andy
I have project compiled as Debug,x64.
- 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"
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
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*
Andy
2016-12-31 19:29:00 UTC
Permalink
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>
Daniel Anderson
2016-12-31 20:59:14 UTC
Permalink
Post by Andy
Where I can change it? I have deleted BlockNew.VC.db
<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
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*
Andy
2016-12-31 21:04:15 UTC
Permalink
I don't know how Vsiaul Studio makes name libboost_filesystem-vc140-mt-
gd-1_61.lib
John Maddock
2017-01-01 08:28:29 UTC
Permalink
Post by Andy
I have project compiled as Debug,x64.
- 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"
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.
Andy
2017-01-01 10:25:09 UTC
Permalink
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"?
degski
2017-01-01 12:56:23 UTC
Permalink
Post by 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
Andy
2017-01-01 13:10:51 UTC
Permalink
Thanks, how to recompile boost linked to the dynamic crt?
b2 variant=debug,release link=dynamic runtime-link=dynamic address-model=64
?
degski
2017-01-01 13:23:42 UTC
Permalink
Post by Andy
Thanks, how to recompile boost linked to the dynamic crt?
b2 variant=debug,release link=dynamic runtime-link=dynamic address-
model=64?
Yes, AFAIK, "runtime-link=dynamic" is the way to do it.

degski
Andy
2017-01-01 13:54:17 UTC
Permalink
b2 variant=debug,release runtime-link=shared address-model=64
degski
2017-01-01 14:15:35 UTC
Permalink
Post by Andy
b2 variant=debug,release runtime-link=shared address-model=64
Yeah, sorry for that (still hung over a bit), always compile
runtime-link=static myself. It works now, does it?

degski
Andy
2017-01-01 14:17:49 UTC
Permalink
Now is OK, Thanks.
degski
2017-01-01 14:21:34 UTC
Permalink
Post by Andy
Now is OK, Thanks.
Great! Sorry for the noise.

degski

Loading...