Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

I start VS2022 developer command prompt as administrator, and issue command "C:\Program Files\Git\bin\sh.exe" build.sh -configuration Release -platform x64 -target-framework net8.0 to build. Then I got following link errors:

Parser.obj : error LNK2019: unresolved external symbol LLVMInitializeAArch64TargetInfo referenced in function "public:
void __cdecl CppSharp::CppParser::Parser::Setup(bool)" (?Setup@Parser@CppParser@CppSharp@@QEAAX_N@Z) [C:\Users\CZhang6
Downloads\CppSharp-1.1.2\CppSharp-1.1.2\build\vs2022\projects\CppSharp.CppParser.vcxproj]
lldCOFF.lib(Driver.obj) : error LNK2001: unresolved external symbol LLVMInitializeAArch64TargetInfo [C:\Users\CZhang6\D
ownloads\CppSharp-1.1.2\CppSharp-1.1.2\build\vs2022\projects\CppSharp.CppParser.vcxproj]
Parser.obj : error LNK2019: unresolved external symbol LLVMInitializeAArch64Target referenced in function "public: void
__cdecl CppSharp::CppParser::Parser::Setup(bool)" (?Setup@Parser@CppParser@CppSharp@@QEAAX_N@Z) [C:\Users\CZhang6\Down
loads\CppSharp-1.1.2\CppSharp-1.1.2\build\vs2022\projects\CppSharp.CppParser.vcxproj]
lldCOFF.lib(Driver.obj) : error LNK2001: unresolved external symbol LLVMInitializeAArch64Target [C:\Users\CZhang6\Downl
oads\CppSharp-1.1.2\CppSharp-1.1.2\build\vs2022\projects\CppSharp.CppParser.vcxproj]
Parser.obj : error LNK2019: unresolved external symbol LLVMInitializeAArch64TargetMC referenced in function "public: vo
id __cdecl CppSharp::CppParser::Parser::Setup(bool)" (?Setup@Parser@CppParser@CppSharp@@QEAAX_N@Z) [C:\Users\CZhang6\Do
wnloads\CppSharp-1.1.2\CppSharp-1.1.2\build\vs2022\projects\CppSharp.CppParser.vcxproj]
lldCOFF.lib(Driver.obj) : error LNK2001: unresolved external symbol LLVMInitializeAArch64TargetMC [C:\Users\CZhang6\Dow
nloads\CppSharp-1.1.2\CppSharp-1.1.2\build\vs2022\projects\CppSharp.CppParser.vcxproj]
Parser.obj : error LNK2019: unresolved external symbol LLVMInitializeAArch64AsmPrinter referenced in function "public:
struct CppSharp::CppParser::ParserResult * __cdecl CppSharp::CppParser::Parser::Compile(class std::basic_string<char,st
ruct std::char_traits,class std::allocator > const &)" (?Compile@Parser@CppParser@CppSharp@@QEAAPEAUParserR
esult@23@AEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z) [C:\Users\CZhang6\Downloads\CppSharp-1.1.
2\CppSharp-1.1.2\build\vs2022\projects\CppSharp.CppParser.vcxproj]
lldCOFF.lib(Driver.obj) : error LNK2001: unresolved external symbol LLVMInitializeAArch64AsmPrinter [C:\Users\CZhang6\D
ownloads\CppSharp-1.1.2\CppSharp-1.1.2\build\vs2022\projects\CppSharp.CppParser.vcxproj]
Parser.obj : error LNK2019: unresolved external symbol LLVMInitializeAArch64AsmParser referenced in function "public: v
oid __cdecl CppSharp::CppParser::Parser::Setup(bool)" (?Setup@Parser@CppParser@CppSharp@@QEAAX_N@Z) [C:\Users\CZhang6\D
ownloads\CppSharp-1.1.2\CppSharp-1.1.2\build\vs2022\projects\CppSharp.CppParser.vcxproj]
lldCOFF.lib(Driver.obj) : error LNK2001: unresolved external symbol LLVMInitializeAArch64AsmParser [C:\Users\CZhang6\Do
wnloads\CppSharp-1.1.2\CppSharp-1.1.2\build\vs2022\projects\CppSharp.CppParser.vcxproj]
......\bin\Release_x64\CppSharp.CppParser.dll : fatal error LNK1120: 5 unresolved externals [C:\Users\CZhang6\Downloa
ds\CppSharp-1.1.2\CppSharp-1.1.2\build\vs2022\projects\CppSharp.CppParser.vcxproj]

You must be logged in to vote

Replies: 2 comments · 1 reply

Comment options

Seems like it was caused by this commit: bbb0693
It is strange because its building fine on CI, it should be using this package for LLVM: https://github.com/mono/CppSharp/releases/download/CppSharp/llvm-6eb36a-windows-vs2022-x64-RelWithDebInfo.7z

But in your case its not finding the correct symbols.

You must be logged in to vote
0 replies
Comment options

Did you previously build CppSharp on this machine?

You must be logged in to vote
1 reply
@ZCH2005
Comment options

This is the first time to build CppCSharp on this machine. Actually, the correct LLVM package was downloaded:

C:\Users\CZhang6\Downloads\CppSharp-1.1.2\build>"C:\Program Files\Git\bin\sh.exe" build.sh -configuration Release -platform=X64 -target-framework net8.0
net8.0
Archive llvm-6eb36a-windows-vs2022-x64-RelWithDebInfo.7z already exists.
Using debug LLVM build: C:/Users/CZhang6/Downloads/CppSharp-1.1.2/build/llvm/llvm-6eb36a-windows-vs2022-x64-Debug
Using release LLVM build: C:/Users/CZhang6/Downloads/CppSharp-1.1.2/build/llvm/llvm-6eb36a-windows-vs2022-x64-RelWithDebInfo
Generating CppSharp build configuration file 'BuildConfig.cs'
Building configurations...
Running action 'vs2022'...
Done (216ms).

Determining projects to restore...
All projects are up-to-date for restore.

CppSharp -> C:\Users\CZhang6\Downloads\CppSharp-1.1.2\bin\Release_x64\CppSharp.dll
CppSharp.AST -> C:\Users\CZhang6\Downloads\CppSharp-1.1.2\bin\Release_x64\CppSharp.AST.dll
Creating library ......\bin\Release_x64\CppSharp.CppParser.lib and object ......\bin\Release_x64\CppSharp.CppP
arser.exp
Parser.obj : error LNK2019: unresolved external symbol LLVMInitializeAArch64TargetInfo referenced in function "public:
void __cdecl CppSharp::CppParser::Parser::Setup(bool)" (?Setup@Parser@CppParser@CppSharp@@QEAAX_N@Z) [C:\Users\CZhang6
Downloads\CppSharp-1.1.2\build\vs2022\projects\CppSharp.CppParser.vcxproj]
lldCOFF.lib(Driver.obj) : error LNK2001: unresolved external symbol LLVMInitializeAArch64TargetInfo [C:\Users\CZhang6\D
ownloads\CppSharp-1.1.2\build\vs2022\projects\CppSharp.CppParser.vcxproj]
Parser.obj : error LNK2019: unresolved external symbol LLVMInitializeAArch64Target referenced in function "public: void
__cdecl CppSharp::CppParser::Parser::Setup(bool)" (?Setup@Parser@CppParser@CppSharp@@QEAAX_N@Z) [C:\Users\CZhang6\Down
loads\CppSharp-1.1.2\build\vs2022\projects\CppSharp.CppParser.vcxproj]
lldCOFF.lib(Driver.obj) : error LNK2001: unresolved external symbol LLVMInitializeAArch64Target [C:\Users\CZhang6\Downl
oads\CppSharp-1.1.2\build\vs2022\projects\CppSharp.CppParser.vcxproj]
Parser.obj : error LNK2019: unresolved external symbol LLVMInitializeAArch64TargetMC referenced in function "public: vo
id __cdecl CppSharp::CppParser::Parser::Setup(bool)" (?Setup@Parser@CppParser@CppSharp@@QEAAX_N@Z) [C:\Users\CZhang6\Do
wnloads\CppSharp-1.1.2\build\vs2022\projects\CppSharp.CppParser.vcxproj]
lldCOFF.lib(Driver.obj) : error LNK2001: unresolved external symbol LLVMInitializeAArch64TargetMC [C:\Users\CZhang6\Dow
nloads\CppSharp-1.1.2\build\vs2022\projects\CppSharp.CppParser.vcxproj]
Parser.obj : error LNK2019: unresolved external symbol LLVMInitializeAArch64AsmPrinter referenced in function "public:
struct CppSharp::CppParser::ParserResult * __cdecl CppSharp::CppParser::Parser::Compile(class std::basic_string<char,st
ruct std::char_traits,class std::allocator > const &)" (?Compile@Parser@CppParser@CppSharp@@QEAAPEAUParserR
esult@23@AEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z) [C:\Users\CZhang6\Downloads\CppSharp-1.1.
2\build\vs2022\projects\CppSharp.CppParser.vcxproj]
lldCOFF.lib(Driver.obj) : error LNK2001: unresolved external symbol LLVMInitializeAArch64AsmPrinter [C:\Users\CZhang6\D
ownloads\CppSharp-1.1.2\build\vs2022\projects\CppSharp.CppParser.vcxproj]
Parser.obj : error LNK2019: unresolved external symbol LLVMInitializeAArch64AsmParser referenced in function "public: v
oid __cdecl CppSharp::CppParser::Parser::Setup(bool)" (?Setup@Parser@CppParser@CppSharp@@QEAAX_N@Z) [C:\Users\CZhang6\D
ownloads\CppSharp-1.1.2\build\vs2022\projects\CppSharp.CppParser.vcxproj]
lldCOFF.lib(Driver.obj) : error LNK2001: unresolved external symbol LLVMInitializeAArch64AsmParser [C:\Users\CZhang6\Do
wnloads\CppSharp-1.1.2\build\vs2022\projects\CppSharp.CppParser.vcxproj]
......\bin\Release_x64\CppSharp.CppParser.dll : fatal error LNK1120: 5 unresolved externals [C:\Users\CZhang6\Downloa
ds\CppSharp-1.1.2\build\vs2022\projects\CppSharp.CppParser.vcxproj]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.