osx - Boost Libraries: Unable to link regex library on MAC OS X -
i'm trying use boost libraries ... no avail. attempted follow getting started tutorial on boost's website (for unix variants), having problems along way.
i compiled libraries directory in downloads folder:
/users/myusername/downloads/boostcompiled   when use full path library ... example program (given on boost website) compiles , links fine.
g++ -o boosttesting boosttesting.cpp -i /users/myusername/downloads/boostcompiled/include/ /users/myusername/downloads/boostcompiled/lib/libboost_regex.a   however, when attempt link using -l , -l options ... fails ...
g++ -o boosttesting boosttesting.cpp -i /users/myusername/downloads/boostcompiled/include/ -l /users/myusername/downloads/boostcompiled/lib/ -l boost_regex  ld: library not found -lboost_regex collect2: ld returned 1 exit status  g++ -o boosttesting boosttesting.cpp -i /users/myusername/downloads/boostcompiled/include/ -l /users/myusername/downloads/boostcompiled/lib/ -l libboost_regex  ld: library not found -llibboost_regex collect2: ld returned 1 exit status  g++ -o boosttesting boosttesting.cpp -i /users/myusername/downloads/boostcompiled/include/ -l /users/myusername/downloads/boostcompiled/lib/ -l regex  ld: library not found -lregex collect2: ld returned 1 exit status   my shell bash ... , i've set dyld_library_path following:
export dyld_library_path=/usr/local/cuda/lib:/users/myusername/downloads/boostcompiled/lib   it appears i'm not using correct name link (with -l) option. can please help! in advance!
there shouldn't space between
-l,/users/myusername/downloads/boostcompiled/lib/make sure
libboost_regex.acompiled in/users/myusername/downloads/boostcompiled/lib.
then should work:
g++ -o boosttesting boosttesting.cpp -i/users/myusername/downloads/boostcompiled/include/ -l/users/myusername/downloads/boostcompiled/lib/ -lboost_regex      
Comments
Post a Comment