简体   繁体   English

为什么gcc不识别-rdynamic选项?

[英]Why gcc doesn't recognize -rdynamic option?

I got a gcc compilation error: 我收到了gcc编译错误:

gcc-4.9: error: unrecognized command line option '-rdynamic'

and I tested compilation with -rdynamic in some environments. 我在某些环境中使用-rdynamic测试了编译。 While I used the same version of gcc (4.9.2), in some environments gcc worked well, but others (eg Homebrew gcc 4.9.2_1, cygwin 64bit) not. 虽然我使用相同版本的gcc(4.9.2),但在某些环境中gcc运行良好,但其他(例如Homebrew gcc 4.9.2_1,cygwin 64bit)则没有。 What makes the difference? 有什么区别?

-rdynamic passes the flag -export-dynamic to ELF linker, on targets that support it . -rdynamic将标志-export-dynamic传递给支持它的目标上的 ELF链接器。

Executable formats in OS X and Windows are not ELF, thus the option -rdynamic is not supported building for these operating systems. OS X和Windows中的可执行格式不是ELF,因此不支持为这些操作系统构建选项-rdynamic

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM