Re: [Boost-users] [Boost.Filesystem] problem to link an executabl e to boost_filesys tem static library on Windows XP

Hello Rush and everybody, Thank you for your answer. Unfortunately, it does NOT match the name. The name computed "by auto_link.hpp" is boost_filesystem-vc71-mt-s-1_33.lib and the name of the static library on my computer is boost_filesystem-vc71-mt-1_33.lib (without the '-s'). So my problem is a problem of name mismatch, not a problem of project configuration for linking. Thank you. Johan GUIHENEUF -----Message d'origine----- De : boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] De la part de Rush Manbert Envoyé : mardi 7 novembre 2006 20:40 À : boost-users@lists.boost.org Objet : Re: [Boost-users] [Boost.Filesystem] problem to link an executable to boost_filesys tem static library on Windows XP Johan.GUIHENEUF@external.thalesgroup.com wrote:
Hello,
I try to build an console executable that uses boost_fileystem library. I have got the file boost_filesystem-vc71-mt-1_33.lib. My IDE is Visual C++ 7.1. I set the preprocessor definition _MT. At build step, I have this error: "could not find boost_filesystem-vc71-mt-s-1_33.lib". I had a look to boost/config/auto_link.hpp to see what "#define" I forgot but I do not understand why it chooses "#define BOOST_LIB_RT_OPT -s".
hat preprocessor macro should I define to make it choose "#define BOOST_LIB_RT_OPT" (i.e. empty) ? Is there a blocking problem with Visual C++ 7.1 on Windows XP ?
Hi Johan, If you have verified that the library name generated by the auto link (boost_filesystem-vc71-mt-s-1_33.lib) matches what was installed by the boost build, then it looks like you didn't define the path to the library for the linker. This should be settable via the linker preferences, but I use VS 2005, so don't know how you would do it. - Rush _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Johan.GUIHENEUF@external.thalesgroup.com wrote:
Hello Rush and everybody,
Thank you for your answer. Unfortunately, it does NOT match the name. The name computed "by auto_link.hpp" is boost_filesystem-vc71-mt-s-1_33.lib and the name of the static library on my computer is boost_filesystem-vc71-mt-1_33.lib (without the '-s'). So my problem is a problem of name mismatch, not a problem of project configuration for linking.
Auto-link is looking for a library that was built with: * static runtime * multithreading But the lib on your HD was built with: * dynamic runtime * multithreading And the two are not binary compatible. So either: Change your code generation setting to "debug multithread dll" or Build the static runtime versions: you will need to follow the getting started guide for this: http://www.boost.org/more/getting_started.html BTW, I notice in your original message you say you set the preprocessor define _MT - you should *never ever* do that yourself - the compiler will define it for you if you select one of the multi-threaded code generation options. Boost will get seriously confused if you lie about which runtime is actually being used (and so will any other libraries you may use). But you probably knew all that already :-) HTH, John.

Johan.GUIHENEUF@external.thalesgroup.com wrote:
Hello Rush and everybody,
Thank you for your answer. Unfortunately, it does NOT match the name. The name computed "by auto_link.hpp" is boost_filesystem-vc71-mt-s-1_33.lib and the name of the static library on my computer is boost_filesystem-vc71-mt-1_33.lib (without the '-s'). So my problem is a problem of name mismatch, not a problem of project configuration for linking.
So now I can finally see the difference in the original post. I must have read the filenames three times to be *ABSOLUTELY SURE* that they were the same. But my eyes must be getting old. Sorry. - Rush
participants (3)
-
Johan.GUIHENEUF@external.thalesgroup.com
-
John Maddock
-
Rush Manbert