Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
gcc-mp-4.8 test.c otool -L a.out
显示可执行文件与 链接/opt/local/lib/gcc48/libgcc_s.1.dylib,这不是我想要的,因为该路径不会在股票 Mac OS X 系统上存在。
/opt/local/lib/gcc48/libgcc_s.1.dylib
如何使用 MacPorts 安装的 GCC 4.8 来构建与 MacPorts 无关的可执行文件/usr/lib/libgcc_s.1.dylib?
/usr/lib/libgcc_s.1.dylib
我试过添加-L/usr/lib/ -lgcc_s.1参数,但这并没有改变任何东西。
-L/usr/lib/ -lgcc_s.1
gcc 并不是要链接到旧版本的库。但是,您应该能够改为静态链接。