我刚刚使用vcpkg安装了llvm 17.0.2#1,构建进行得很好,但现在当我尝试使用它时,我得到了这个链接器错误:LLVMCore.lib(DataLayout.cpp.obj) : error LNK2019: unresolved external symbol __std_max_element_1 referenced in function "unsigned char const * __cdecl __std_max_element<unsigned char const >(unsigned char const *,unsigned char const *)" (??$__std_max_element@$$CBE@@YAPEBEPEBE0@Z)
该项目是一个新创建的Visual Studio 2022 c空项目,定义了_SILENCE_ALL_CXX23_DEPRECATION_WARNINGS
以允许编译(否则我会在c23中得到一个已弃用的功能编译错误)
以下是我的源文件:
#pragma warning(disable:4146)
#include <llvm/IR/IRBuilder.h>
int main()
{
std::unique_ptr<llvm::LLVMContext> TheContext;
return 0;
}
字符串
我试着用c++14/17/20和23/newest编译,每次都得到同样的错误。
更多信息:
- Windows SDK:10.0
- 平台工具集:Visual Studio 2022(v143)
- vcpkg AutoLink设置为True
- 我有其他来自vcpkg的包可以工作
1条答案
按热度按时间vulvrdjw1#
更新Visual Studio修复了它