How to let g++ search for library directory /opt/local/lib/
Peng Yu
pengyu.ut at gmail.com
Sat Mar 16 08:40:00 PDT 2013
Hi,
g++ does not search /opt/local/lib/ by default. Does anybody know how
to let it search /opt/local/lib/ by default?
~/linux/test/cpp/library/pcrecpp$ port select gcc
Available versions for gcc:
apple-gcc42 (active)
llvm-gcc42
mp-gcc45
mp-gcc47
none
~/linux/test/cpp/library/pcrecpp$ g++ main.o -lpcrecpp -o main
-L/opt/local/lib/
~/linux/test/cpp/library/pcrecpp$ g++ main.o -lpcrecpp -o main
ld: library not found for -lpcrecpp
collect2: ld returned 1 exit status
--
Regards,
Peng
More information about the macports-users
mailing list