我想要做的就是建立這個庫:直到我反對libclang聯 https://github.com/AustinBrunkhorst/CPP-Reflection 一切都進展順利,其中發生這種情況:試圖在Visual Studio鏈接libclang當鏈接錯誤
1>Cursor.obj : error LNK2001: unresolved external symbol __imp_clang_CXXMethod_isStatic
1>Cursor.obj : error LNK2001: unresolved external symbol __imp_clang_getCursorType
1>Cursor.obj : error LNK2001: unresolved external symbol __imp_clang_Cursor_getMangling
1>Cursor.obj : error LNK2001: unresolved external symbol __imp_clang_getCXXAccessSpecifier
1>Cursor.obj : error LNK2001: unresolved external symbol __imp_clang_Cursor_getStorageClass
1>Cursor.obj : error LNK2001: unresolved external symbol __imp_clang_getCursorSpelling
1>Cursor.obj : error LNK2001: unresolved external symbol __imp_clang_visitChildren
1>Cursor.obj : error LNK2001: unresolved external symbol __imp_clang_getTypedefDeclUnderlyingType
1>Cursor.obj : error LNK2001: unresolved external symbol __imp_clang_getCursorDisplayName
1>Cursor.obj : error LNK2001: unresolved external symbol __imp_clang_CXXMethod_isConst
1>Cursor.obj : error LNK2001: unresolved external symbol __imp_clang_isCursorDefinition
1>Cursor.obj : error LNK2001: unresolved external symbol __imp_clang_getCursorLexicalParent
1>Cursor.obj : error LNK2001: unresolved external symbol __imp_clang_getCursorResultType
1>CursorType.obj : error LNK2001: unresolved external symbol __imp_clang_isConstQualifiedType
1>CursorType.obj : error LNK2001: unresolved external symbol __imp_clang_getNumArgTypes
1>CursorType.obj : error LNK2001: unresolved external symbol __imp_clang_getTypeDeclaration
1>CursorType.obj : error LNK2001: unresolved external symbol __imp_clang_getTypeSpelling
1>CursorType.obj : error LNK2001: unresolved external symbol __imp_clang_getArgType
1>CursorType.obj : error LNK2001: unresolved external symbol __imp_clang_getCanonicalType
1>MetaUtils.obj : error LNK2001: unresolved external symbol __imp_clang_disposeString
1>MetaUtils.obj : error LNK2001: unresolved external symbol __imp_clang_getCString
1>ReflectionParser.obj : error LNK2001: unresolved external symbol __imp_clang_getTranslationUnitCursor
1>ReflectionParser.obj : error LNK2001: unresolved external symbol __imp_clang_createTranslationUnitFromSourceFile
1>ReflectionParser.obj : error LNK2001: unresolved external symbol __imp_clang_createIndex
1>ReflectionParser.obj : error LNK2001: unresolved external symbol __imp_clang_disposeIndex
1>ReflectionParser.obj : error LNK2001: unresolved external symbol __imp_clang_disposeTranslationUnit
我正在構建64位版本,並且我也在64位/版本模式下從源代碼手動構建了llvm/clang。 我不知道是否重要(?),但我使用github的clang主分支。考慮到一切都經過,直到鏈接階段,我認爲,一切都應該與主分支。
我使用Visual Stduio 2015年
在項目選擇我已經添加附加庫目錄,以點鏗鏘有* .lib文件。
哦,非常感謝你!有效。 –