To instruct g++ to look in an additional directory for libraries use "-L <path>"<br><br>I believe that's what you're looking for.<br><br><div><span class="gmail_quote">On 5/30/07, <b class="gmail_sendername"> Scott Meyers</b> <<a href="mailto:usenet@aristeia.com">usenet@aristeia.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> I've built Boost 1.34 for VC8 and g++ 4.1.1 on WinXP. I'm testing my<br>installation with a simple program that uses Boost.FileSystem and Boost.Regex.<br>Compilation is no problem, and for VC8, all I have to do to get things to link <br>is add the location of the Boost binaries to the LIB environment variable.<br><br>I was hoping that all I had to do for g++ was do the same for the LIBRARY_PATH<br>environment variable (per<br><a href="http://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html"> http://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html</a>), but I get<br>unresolved symbol errors during linking even after doing that. I played around<br>with the -l option (per<br><a href="http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html#Link-Options"> http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html#Link-Options</a>), but nothing I<br>tried worked.<br><br>I have the following relevant binaries in my Boost binary directory:<br><br>libboost_regex-mgw41-1_34.a<br>libboost_regex-mgw41-d-1_34.a <br>libboost_regex-mgw41-mt-1_34.a<br>libboost_regex-mgw41-mt-d-1_34.a<br>libboost_regex-mgw41-mt-s-1_34.a<br>libboost_regex-mgw41-mt-sd-1_34.a<br>libboost_regex-mgw41-s-1_34.a<br>libboost_regex-mgw41-sd-1_34.a<br>boost_filesystem-mgw41-1_34.a <br>boost_filesystem-mgw41-d-1_34.a<br>boost_filesystem-mgw41-mt-1_34.a<br>boost_filesystem-mgw41-mt-d-1_34.a<br>libboost_filesystem-mgw41-1_34.a<br>libboost_filesystem-mgw41-d-1_34.a<br>libboost_filesystem-mgw41-mt-1_34.a <br>libboost_filesystem-mgw41-mt-d-1_34.a<br>libboost_filesystem-mgw41-mt-s-1_34.a<br>libboost_filesystem-mgw41-mt-sd-1_34.a<br>libboost_filesystem-mgw41-s-1_34.a<br>libboost_filesystem-mgw41-sd-1_34.a<br><br>Can somebody explain or point me to an explanation of what I need to do to get a <br>program using Boost binaries to link? I'm hoping there's something as simple as<br>with VC8 where I can just specify a directory to look in and have the linker<br>magically figure everything out from there. I'd like to avoid explicitly having <br>to add a new library to link against each time I start using a new compiled<br>Boost library in a project.<br><br>Incidentally, in the above list of files, I notice that for Boost.FileSystem,<br>there are some archives that start with lib and some that do not, while for <br>regex, all start with lib. Is this meaningful?<br><br>Thanks,<br><br>Scott<br><br><br><br><br>_______________________________________________<br>Boost-users mailing list<br><a href="mailto:Boost-users@lists.boost.org"> Boost-users@lists.boost.org</a><br><a href="http://lists.boost.org/mailman/listinfo.cgi/boost-users">http://lists.boost.org/mailman/listinfo.cgi/boost-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>Bobby R. Ward <br>------------------------------<br><a href="mailto:bobbyrward@gmail.com">bobbyrward@gmail.com</a><br><br><a href="http://www.bobbyrward.com">http://www.bobbyrward.com</a><br><a href="http://combustion.sourceforge.net"> http://combustion.sourceforge.net</a>