目前在我们的 macOS C++ 构建中看到这个链接器警告:
我们在我们的CMakeLists.txt文件中设置了这个链接器选项:
我不清楚为什么这个已经被弃用,以及我应该采取的行动。
[build] [430/431 99% :: 9.484] Linking CXX executable foobar
[build] ld: warning: -undefined error is deprecated
我们在我们的CMakeLists.txt文件中设置了这个链接器选项:
add_link_options("-Wl,-undefined,error")
ld
链接器的 man 手册也没有提供有用的信息:-undefined treatment
Specifies how undefined symbols are to be treated. Options are: error, warning, suppress,
or dynamic_lookup. The default is error. Note: dynamic_lookup that depends on lazy binding
will not work with chained fixups.
我不清楚为什么这个已经被弃用,以及我应该采取的行动。