Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glslang fails building as shared library on Windows #2519

Closed
mtavenrath opened this issue Feb 2, 2021 · 2 comments
Closed

glslang fails building as shared library on Windows #2519

mtavenrath opened this issue Feb 2, 2021 · 2 comments

Comments

@mtavenrath
Copy link
Contributor

To reproduce launch a visual studio command prompt and launch the following commands:

cmake -G Ninja -B build-repro -DBUILD_SHARED_LIBS=ON
cmake --build build-repro

This will result in hundreds of linker errors due to missing exports like those below.

StandAlone.cpp.obj : error LNK2019: unresolved external symbol "void __cdecl glslang::OS_DumpMemoryCounters(void)" (?OS_DumpMemoryCounters@glslang@@YAXXZ) referenced in function "void __cdecl CompileFile(char const *,void *)" (?CompileFile@@YAXPEBDPEAX@Z)
StandAlone.cpp.obj : error LNK2019: unresolved external symbol __imp_ShInitialize referenced in function "int __cdecl singleMain(void)" (?singleMain@@YAHXZ)
StandAlone.cpp.obj : error LNK2019: unresolved external symbol __imp_ShFinalize referenced in function "int __cdecl singleMain(void)" (?singleMain@@YAHXZ)
StandAlone.cpp.obj : error LNK2019: unresolved external symbol __imp_ShConstructCompiler referenced in function "void __cdecl CompileShaders(class glslang::TWorklist &)" (?CompileShaders@@YAXAEAVTWorklist@glslang@@@Z)

Using Visual Studio to build the project results in import libraries not being created for SPIRVd.lib because no symbols are being exported.

@greg-lunarg
Copy link
Contributor

Looking at whether a remedy might be pulled from this effort: KhronosGroup/SPIRV-Tools#3909

@greg-lunarg
Copy link
Contributor

Looking into this more, I remembered that shared lib support is WIP. See #2283.

I believe the issue noted above encompasses this issue, so I will close this issue. Please reopen if you believe otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants