Hi Scott, I have not been following this whole thread, but unless there is a directory with the built boost libraries on your path, you need to specify the path to the boost libraries on your command line. With gcc/g++ you do this with the -L option, followed by the directory that the boost .dlls and import libraries are in. ex: -L/path/to/built/boost/libs Hope this helps. - Dave On Wed, 2007-05-30 at 10:15 -0700, Scott Meyers wrote:
Vladimir Prus wrote:
What is the exact command line you've used, and what is the exact error you've got?
D:\Temp>g++ -Wall -O3 -ID:\C++\Boost\Current -o boostbuildtest.exe boostbuildtest.cpp -lboost_filesystem -lboost_regex d:\apps\msys\1.0\mingw\bin\..\lib\gcc\mingw32\4.1.1\..\..\..\..\mingw32\bin\ld.exe: cannot find -lboost_filesystem collect2: ld returned 1 exit status
Reversing the order of the libraries to link yields this:
D:\Temp>g++ -Wall -O3 -ID:\C++\Boost\Current -o boostbuildtest.exe boostbuildtest.cpp -lboost_regex -lboost_filesystem d:\apps\msys\1.0\mingw\bin\..\lib\gcc\mingw32\4.1.1\..\..\..\..\mingw32\bin\ld.exe: cannot find -lboost_regex collect2: ld returned 1 exit status
This suggests that whichever library is listed first is the one leading to the linker quitting.
Specifying full paths doesn't help:
D:\Temp>g++ -Wall -O3 -ID:\C++\Boost\Current -o boostbuildtest.exe boostbuildtest.cpp -lc:\boost_current\lib\boost_regex -lc:\boost_ current\lib\boost_filesystem d:\apps\msys\1.0\mingw\bin\..\lib\gcc\mingw32\4.1.1\..\..\..\..\mingw32\bin\ld.exe: cannot find -lc:\boost_current\lib\boost_regex collect2: ld returned 1 exit status
But the libraries are there:
D:\Temp>ls c:\boost_current\lib | grep filesystem | grep mgw boost_filesystem-mgw41-1_34.a boost_filesystem-mgw41-d-1_34.a boost_filesystem-mgw41-mt-1_34.a boost_filesystem-mgw41-mt-d-1_34.a libboost_filesystem-mgw41-1_34.a libboost_filesystem-mgw41-d-1_34.a libboost_filesystem-mgw41-mt-1_34.a libboost_filesystem-mgw41-mt-d-1_34.a libboost_filesystem-mgw41-mt-s-1_34.a libboost_filesystem-mgw41-mt-sd-1_34.a libboost_filesystem-mgw41-s-1_34.a libboost_filesystem-mgw41-sd-1_34.a
D:\Temp>ls c:\boost_current\lib | grep regex | grep mgw libboost_regex-mgw41-1_34.a libboost_regex-mgw41-d-1_34.a libboost_regex-mgw41-mt-1_34.a libboost_regex-mgw41-mt-d-1_34.a libboost_regex-mgw41-mt-s-1_34.a libboost_regex-mgw41-mt-sd-1_34.a libboost_regex-mgw41-s-1_34.a libboost_regex-mgw41-sd-1_34.a
Suggestions?
Thanks,
Scott
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users