Kornel
Kornel

Reputation: 100190

Mac executable with GCC 4.8 without MacPorts dependency

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.

Upvotes: 0

Views: 332

Answers (1)

Mahmoud Al-Qudsi
Mahmoud Al-Qudsi

Reputation: 29579

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

Upvotes: 1

Related Questions