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

BUILD_SHARED_LIBS=1 does not export any functions #2863

Closed
obhi-d opened this issue Jan 9, 2022 · 1 comment
Closed

BUILD_SHARED_LIBS=1 does not export any functions #2863

obhi-d opened this issue Jan 9, 2022 · 1 comment

Comments

@obhi-d
Copy link

obhi-d commented Jan 9, 2022

I am trying to create a TShader/TProgram object within my program while linking to the exported glslang target after CMake has built and installed glslang on a specific folder. I end up getting several linker errors like so:

error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl glslang::TShader::TShader(enum EShLanguage)" (__imp_??0TShader@glslang@@QEAA@W4EShLanguage@@@Z) referenced in function "public: __cdecl sfxt::GLSLangShader::GLSLangShader(enum lev::ShaderStage::Enum)" (??0GLSLangShader@sfxt@@QEAA@W4Enum@ShaderStage@lev@@@Z)

Digging through the CMake files I see MachineIndependent is a static library, which expects the dllexport on certain functions to work when glslang target is built while linking to MachineIndependent, etc. but it doesn't work currently.

DUMPBIN of the glslangd.lib file shows no TShader/TProgram symbols being exported.

@greg-lunarg
Copy link
Contributor

At the moment glslang is not supporting a shared build and not creating any shared objects. This is a known problem. See #2283 #2346 #2196. This issue is currently not at the front of my queue, so it may not be resolved soon, at least by me.

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