为什么GCC不承认-rdynamic选项? [英] Why gcc doesn't recognize -rdynamic option?
问题描述
我有一个gcc编译错误:
I got a gcc compilation error:
gcc-4.9: error: unrecognized command line option '-rdynamic'
和我测试的编译,在某些环境-rdynamic。虽然我用gcc(4.9.2)的同一版本,在某些环境下GCC效果不错,但其他人(例如家酿GCC 4.9.2_1下,cygwin 64位)没有。是什么让差异?
and I tested compilation with -rdynamic in some environments. While I used the same version of gcc (4.9.2), in some environments gcc worked well, but others (e.g. Homebrew gcc 4.9.2_1, cygwin 64bit) not. What makes the difference?
推荐答案
-rdynamic
通过支持它<目标/强旗 -export动态
来ELF链接器,>。
-rdynamic
passes the flag -export-dynamic
to ELF linker, on targets that support it.
可执行文件格式在OS X和Windows都没有ELF,因此选择 -rdynamic
不支持建设这些操作系统。
Executable formats in OS X and Windows are not ELF, thus the option -rdynamic
is not supported building for these operating systems.
这篇关于为什么GCC不承认-rdynamic选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!