How to let g++ search for library directory /opt/local/lib/

Peng Yu pengyu.ut at gmail.com
Sat Mar 16 10:03:10 PDT 2013


> You should activate one of the MacPorts compilers instead of the apple
> version.  mp-gcc47 and mp-gcc45 should automatically search in
> /opt/local/lib for libraries.

~/linux/test/cpp/library/pcrecpp$ sudo port select gcc mp-gcc45
Selecting 'mp-gcc45' for 'gcc' succeeded. 'mp-gcc45' is now active.
~/linux/test/cpp/library/pcrecpp$ g++ main.o  -lpcrecpp  -o main
g++-mp-4.5: error trying to exec
'/opt/local/bin/i686-apple-darwin11-llvm-g++-4.2': execvp: No such
file or directory

I get the above error. Does anybody know what is wrong?

-- 
Regards,
Peng


More information about the macports-users mailing list