This repository has been archived by the owner on May 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 256
Build error with glslang #95
Comments
I had the same error on Linux (using GCC). I fixed it by adding the following to the bottom of cmake/3rdparty/glslang.cmake:
not sure if this is the correct approach to fix this quirk but it works (for now :) |
If I do that on Windows, the header error is fixed but it's traded for an undefined symbols error in 50>glslang.lib(ShaderLang.obj) : error LNK2019: unresolved external symbol "public: __cdecl glslang::HlslParseContext::HlslParseContext(class glslang::TSymbolTable &,class glslang::TIntermediate &,bool,int,enum EProfile,struct glslang::SpvVersion const &,enum EShLanguage,class TInfoSink &,class std::basic_string<char,struct std::char_traits<char>,class glslang::pool_allocator<char> >,bool,enum EShMessages)" (??0HlslParseContext@glslang@@QEAA@AEAVTSymbolTable@1@AEAVTIntermediate@1@_NHW4EProfile@@AEBUSpvVersion@1@W4EShLanguage@@AEAVTInfoSink@@V?$basic_string@DU?$char_traits@D@std@@V?$pool_allocator@D@glslang@@@std@@2W4EShMessages@@@Z) referenced in function "class glslang::TParseContextBase * __cdecl `anonymous namespace'::CreateParseContext(class glslang::TSymbolTable &,class glslang::TIntermediate &,int,enum EProfile,enum glslang::EShSource,enum EShLanguage,class TInfoSink &,struct glslang::SpvVersion,bool,enum EShMessages,bool,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?CreateParseContext@?A0x5e3bac6d@@YAPEAVTParseContextBase@glslang@@AEAVTSymbolTable@3@AEAVTIntermediate@3@HW4EProfile@@W4EShSource@3@W4EShLanguage@@AEAVTInfoSink@@USpvVersion@3@_NW4EShMessages@@7V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
50>glslang.lib(ShaderLang.obj) : error LNK2019: unresolved external symbol "public: __cdecl glslang::TBuiltInParseablesHlsl::TBuiltInParseablesHlsl(void)" (??0TBuiltInParseablesHlsl@glslang@@QEAA@XZ) referenced in function "class glslang::TBuiltInParseables * __cdecl `anonymous namespace'::CreateBuiltInParseables(class TInfoSink &,enum glslang::EShSource)" (?CreateBuiltInParseables@?A0x5e3bac6d@@YAPEAVTBuiltInParseables@glslang@@AEAVTInfoSink@@W4EShSource@3@@Z)
50>glslang.lib(ShaderLang.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl glslang::HlslScanContext::fillInKeywordMap(void)" (?fillInKeywordMap@HlslScanContext@glslang@@SAXXZ) referenced in function ShInitialize
50>glslang.lib(ShaderLang.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl glslang::HlslScanContext::deleteKeywordMap(void)" (?deleteKeywordMap@HlslScanContext@glslang@@SAXXZ) referenced in function ShFinalize
50>C:\Users\Ravbug\Documents\RavEngine-AirHockey\RavEngine\build\debug\shaderc.exe : fatal error LNK1120: 4 unresolved externals The modification I made to target_include_directories( glslang PUBLIC
${BGFX_DIR}/3rdparty/spirv-tools/include
${BGFX_DIR}/3rdparty/spirv-tools/source
${BGFX_DIR}/3rdparty/glslang
${BGFX_DIR}/3rdparty/glslang/glslang/Include
${BGFX_DIR}/3rdparty/glslang/glslang/Public
# my modification below:
PRIVATE
${BGFX_DIR}/3rdparty
) |
On Windows with MSVC 2019, I had to apply both mipek's patch and also #93 in order to the unresolved external symbol errors. |
fdboi
added a commit
to fdboi/bgfx.cmake
that referenced
this issue
Jan 25, 2021
fdboi
added a commit
to fdboi/bgfx.cmake
that referenced
this issue
Jan 25, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In my CMakeLists.txt:
I get the following compilation error on Windows (VS 2019):
The text was updated successfully, but these errors were encountered: