[program_options] Unsure about linking options
Hi! I am not sure if this is the issue of the program_options library or of all libraries at all. I got the HEAD revision from CVS and successfully compiled required libraries. One of the required libs is program_options. I have variations of the compiled lib with a name as: boost_program_options-vc-mt-1_35.lib When I try to recompile my code I get a linking error stating: LINK : fatal error LNK1104: cannot open file 'libboost_program_options-vc80-mt-gd-1_35.lib' My question is: Why is compiler still looking for libboost_program_options-vc80-mt-gd-1_35.lib? Do I have to change some config files? If yes, which? With Kind Regards, Ovanes Markarian
Ovanes Markarian schrieb:
I got the HEAD revision from CVS and successfully compiled required libraries. One of the required libs is program_options. I have variations of the compiled lib with a name as:
boost_program_options-vc-mt-1_35.lib
When I try to recompile my code I get a linking error stating:
LINK : fatal error LNK1104: cannot open file 'libboost_program_options-vc80-mt-gd-1_35.lib'
My question is: Why is compiler still looking for libboost_program_options-vc80-mt-gd-1_35.lib? Do I have to change some config files? If yes, which?
The boost_*.lib files are the import libraries to use the boost DLLS.
The libboost_*.lib files are the libraries for static linking.
The default is that the boost libraries are statically linked. If you
#define BOOST_ALL_DYN_LINK then the DLL versions will be linked.
If you #define BOOST_ALL_NO_LIB then the automatic linking is disabled,
and you have to specify the boost libraries in the linker command line.
All these defines can be configured in
Norbert thanks for your answer! The problem I currently face is that boost compilation generates files with -vc- toolset name, but the linker looks for the libs with -vc80- toolset name. Many thanks, Ovanes. On Fri, March 9, 2007 12:52, Norbert Unterberg wrote:
Ovanes Markarian schrieb:
I got the HEAD revision from CVS and successfully compiled required libraries. One of the required libs is program_options. I have variations of the compiled lib with a name as:
boost_program_options-vc-mt-1_35.lib
When I try to recompile my code I get a linking error stating:
LINK : fatal error LNK1104: cannot open file 'libboost_program_options-vc80-mt-gd-1_35.lib'
My question is: Why is compiler still looking for libboost_program_options-vc80-mt-gd-1_35.lib? Do I have to change some config files? If yes, which?
The boost_*.lib files are the import libraries to use the boost DLLS. The libboost_*.lib files are the libraries for static linking.
The default is that the boost libraries are statically linked. If you #define BOOST_ALL_DYN_LINK then the DLL versions will be linked.
If you #define BOOST_ALL_NO_LIB then the automatic linking is disabled, and you have to specify the boost libraries in the linker command line.
All these defines can be configured in
Norbert
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Ovanes Markarian wrote:
Hi!
I am not sure if this is the issue of the program_options library or of all libraries at all.
I got the HEAD revision from CVS and successfully compiled required libraries. One of the required libs is program_options. I have variations of the compiled lib with a name as:
boost_program_options-vc-mt-1_35.lib
When I try to recompile my code I get a linking error stating:
LINK : fatal error LNK1104: cannot open file 'libboost_program_options-vc80-mt-gd-1_35.lib'
How did you configure the msvc toolset? If configuring it in user-config.jam, you should have: using msvc : 8.0 : whatever ; and if just using command line, you should use: bjam toolset=msvc-8.0 While it's possible to query compiler version by running compiler binary, such magic is not implemented yet, so you need to specify the version explicitly. - Volodya
How did you configure the msvc toolset? If configuring it in user-config.jam, you should have:
using msvc : 8.0 : whatever ;
and if just using command line, you should use:
bjam toolset=msvc-8.0
While it's possible to query compiler version by running compiler binary, such magic is not implemented yet, so you need to specify the version explicitly.
- Volodya
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Somehow, I do not get through.... ;) The problem is that the site states to use -sTOOLS=vc-8_0. May be this setting is for older bjam build. Let's say I skip it and define in user-config.jam the "using" directive and compile the source as you described, what is used as toolset name in the filename, the "whatever" suffix? I need to produce the same file names as expected from linker. Currently they differ. Bol'shoe spasibo za pomosch..., Ovanes
Ovanes Markarian wrote:
How did you configure the msvc toolset? If configuring it in user-config.jam, you should have:
using msvc : 8.0 : whatever ;
and if just using command line, you should use:
bjam toolset=msvc-8.0
While it's possible to query compiler version by running compiler binary, such magic is not implemented yet, so you need to specify the version explicitly.
- Volodya
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Somehow, I do not get through.... ;) The problem is that the site states to use -sTOOLS=vc-8_0. May be this setting is for older bjam build.
Yes, that's what was in Boost 1.33.1. Would you mind looking at http://boost-consulting.com/boost/more/getting_started/windows.html and use "msvc-8.0" in plase of "toolset-name". Let me know if you run into any problems or unclear parts of docs. - Volodya
Vladimir Prus
Ovanes Markarian wrote:
Hi!
I am not sure if this is the issue of the program_options library or of all libraries at all.
I suspect it's a build problem.
I got the HEAD revision from CVS and successfully compiled required libraries. One of the required libs is program_options. I have variations of the compiled lib with a name as:
boost_program_options-vc-mt-1_35.lib
When I try to recompile my code I get a linking error stating:
LINK : fatal error LNK1104: cannot open file 'libboost_program_options-vc80-mt-gd-1_35.lib'
I am experiencing the same problem with the RC_1_34_0 cvs version of boost, when I reference the filesystem lib: lib myLib : some_source.cpp $(BOOST_ROOT)//filesystem : : : ; filesystem is automatically built in $(BOOST_ROOT)/bin.v2/libs/filesystem/_etc_ but during linking I get the above mentioned error. The library that was actually built lacks the "lib"-prefix and is just called boost_filesystem-vc71-mt-gd.1_34.lib
How did you configure the msvc toolset? If configuring it in user-config.jam, you should have:
using msvc : 8.0 : whatever ;
If configured like that the version number is correct but the linker still cannot find libboost_filesystem-vc71-mt-gd.1_34.lib ------------^^^
and if just using command line, you should use:
bjam toolset=msvc-8.0
Trying the analogous command line for VC7.1 w/o a "versioned" entry in user-config.jam results in the following error: feature.jam:269: in implied-subfeature from module feature error: "7.1" is not a known subfeature value of <toolset>msvc Building the same project with cygwin-gcc works as expected. What needs to be done to make the msvc build work? Chris
participants (4)
-
Chris Hoeppler
-
Norbert Unterberg
-
Ovanes Markarian
-
Vladimir Prus