KhronosGroup / glslang

Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.
Other
2.91k stars 817 forks source link

Linking issues #3460

Closed TheArheus closed 6 months ago

TheArheus commented 6 months ago

Hello, sorry for such a noob question, but i've tried it for several days and I couldn't figure out it. Basically, I have an issues with linking glslang, right now I have this order: vulkan-1.lib glslang.lib glslang-default-resource-limits.lib SPIRV.lib GenericCodeGen.lib SPVRemapper.lib OSDependent.lib MachineIndependent.lib I guess I am linking everything except for SPIRV-Tools. Right now I have only one linking error with this order: MachineIndependent.lib(Constant.obj) : error LNK2019: unresolved external symbol __imp_exp2 referenced in function "public: virtual class glslang::TIntermTyped * __cdecl glslang::TIntermConstantUnion::fold(enum glslang::TOperator,class glslang::TType const &)const " (?fold@TIntermConstantUnion@glslang@@UEBAPEAVTIntermTyped@2@W4TOperator@2@AEBVTType@2@@Z) I saw in other threads I needed to link everythink that compiling glslang library will produce, therefor I've linked everything but that didn't helped to me. Thanks in the advance

arcady-lunarg commented 6 months ago

For what it's worth __imp_exp2 is not a glslang symbol and is part of the C runtime (specifically the implementation of the exp2 function), so it sounds like there some mismatch of the versions of the C runtime that glslang was built with and what you are using somehow.

TheArheus commented 6 months ago

Well, that is interesting, because I definitely compiled this lib with c++. I’ve also tried to compile it with the same version of c++ as I use in my project and the issue is still remains. It looks like some symbols(.lib file) is still missing for it to compile properly