我正在开发JNI C ++库,并且无法使用VisualStudio 2017以64x配置构建。我正在使用iphlpapi和winsock2标头。
它们在Win32配置中都能顺利编译,但是每当我尝试在x64模式下编译相同的代码时,它都会在File MSVCRT.lib中引发所有LINK2001错误,因为我没有收到任何我假设(并检查过)的LINK2019错误.lib存在于我的链接器配置中。
错误列表的摘录:
LNK2001 unresolved external symbol IsProcessorFeaturePresent D:\VS17Projects\repos\Project1\Project1\MSVCRT.lib(gs_report.obj)
LNK2001 unresolved external symbol __imp_DisableThreadLibraryCalls
D:\VS17Projects\repos\Project1\Project1\MSVCRT.lib(dll_dllmain_stub.obj)
LNK2001 unresolved external symbol __imp_RtlCaptureContext
D:\VS17Projects\repos\Project1\Project1\MSVCRT.lib(gs_report.obj)
LNK2001 unresolved external symbol __imp_RtlLookupFunctionEntry D:\VS17Projects\repos\Project1\Project1\MSVCRT.lib(gs_report.obj)
LNK2001 unresolved external symbol __imp_RtlVirtualUnwind D:\VS17Projects\repos\Project1\Project1\MSVCRT.lib(gs_report.obj)
LNK2001 unresolved external symbol __imp_UnhandledExceptionFilter
D:\VS17Projects\repos\Project1\Project1\MSVCRT.lib(gs_report.obj)
LNK2001 unresolved external symbol __imp_SetUnhandledExceptionFilter
D:\VS17Projects\repos\Project1\Project1\MSVCRT.lib(gs_report.obj)
LNK2001 unresolved external symbol __imp_GetCurrentProcess
...(还有更多,但我认为所有操作都将以相同的方式进行修复)