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