Pav*_*van 0 c gcc shared-libraries
我有一个共享库,其中有未定义的符号
JNI_CREATEJavaVM
Run Code Online (Sandbox Code Playgroud)
有什么方法可以包含外部依赖项或告诉编译器忽略该符号?
是的,您可以告诉编译器忽略该符号。
从man ld,
--unresolved-symbols=方法
确定如何处理未解析的符号。method 有四个可能的值:
ignore-all
Do not report any unresolved symbols.
report-all
Report all unresolved symbols. This is the default.
ignore-in-object-files
Report unresolved symbols that are contained in shared
libraries, but ignore them if they come from regular object files.
ignore-in-shared-libs
Report unresolved symbols that come from regular object
files, but ignore them if they come from shared libraries.
Run Code Online (Sandbox Code Playgroud)