سؤال

gcc-mp-4.8 test.c
otool -L a.out

shows that the executable is linked with /opt/local/lib/gcc48/libgcc_s.1.dylib, and that's not what I want, because the path won't exist on a stock Mac OS X system.

How can I use MacPorts-installed GCC 4.8 to build MacPorts-independent executables that would use /usr/lib/libgcc_s.1.dylib instead?

I've tried adding -L/usr/lib/ -lgcc_s.1 to arguments, but that doesn't change anything.

هل كانت مفيدة؟

المحلول

gcc isn't meant to link against the library from older versions.. You should be able to statically link instead, however.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top