c++ - 忽略 C++ 中的 undefined reference

标签 c++ linux gcc compiler-construction

是否有忽略 undefined reference 的编译器选项?我正在 Linux 下编译 C++ 代码。

最佳答案

没有。这是不可能的。链接器实际上无法生成具有 undefined reference 的输出可执行文件。这不是链接器做出的选择。

这有点像在说,“对这个列表进行排序,但我不会告诉你列表是什么”或“解决了我的问题,但我只转储了代码”。

关于c++ - 忽略 C++ 中的 undefined reference ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21260194/

相关文章:

c++ - 使用 GAlib 模板实例化的 Cygwin gcc 编译器问题

c - 具有可能的静态共享库函数的 LD_PRELOAD

c++ - Gedit 如何将其 api 暴露给 python 以供插件使用?

C++仿函数编译错误

c++ - 如何创建一个空垫子并在其上画线?

linux - 如何确定 Linux 上的日志文件文件夹?

c++ - 如何检测 C++ 中的溢出?

c++ - 程序编译、运行,但不会在 DevC++ 中结束

linux - WSL2 - Linux 相对符号链接(symbolic link)在仅针对\\wsl$\挂载点从 Windows 访问时损坏

linux - 终端 : Is there any way to print the file names located in specific directory?