KhronosGroup / KhronosGroup/SPIRV-Cross

[ERROR] Compiling on VS2019

Open
#1,820 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs triage
Dominant language
GLSL
Stars
2.5k
Forks
713
Avg merge
2d 18h
Merged PRs (30d)
16

Description

I get:

1>Hazel.lib(OpenGLShader.obj) : error LNK2001: unresolved external symbol "protected: virtual class std::basic_string<char,struct std::char_traits,class std::allocator > __cdecl spirv_cross::CompilerGLSL::constant_op_expression(struct spirv_cross::SPIRConstantOp const &)" (?constant_op_expression@CompilerGLSL@spirv_cross@@MEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBUSPIRConstantOp@2@@Z)
1>Hazel.lib(OpenGLShader.obj) : error LNK2001: unresolved external symbol "protected: virtual bool __cdecl spirv_cross::CompilerGLSL::variable_decl_is_remapped_storage(struct spirv_cross::SPIRVariable const &,enum spv::StorageClass)const " (?variable_decl_is_remapped_storage@CompilerGLSL@spirv_cross@@MEBA_NAEBUSPIRVariable@2@W4StorageClass@spv@@@Z)
1>Hazel.lib(OpenGLShader.obj) : error LNK2001: unresolved external symbol "protected: virtual bool __cdecl spirv_cross::CompilerGLSL::access_chain_needs_stage_io_builtin_translation(unsigned int)" (?access_chain_needs_stage_io_builtin_translation@CompilerGLSL@spirv_cross@@MEAA_NI@Z)
1>Hazel.lib(OpenGLShader.obj) : error LNK2001: unresolved external symbol "protected: virtual void __cdecl spirv_cross::CompilerGLSL::emit_array_copy(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,unsigned int,unsigned int,enum spv::StorageClass,enum spv::StorageClass)" (?emit_array_copy@CompilerGLSL@spirv_cross@@MEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IIW4StorageClass@spv@@1@Z)
1>Hazel.lib(OpenGLShader.obj) : error LNK2001: unresolved external symbol "protected: virtual void __cdecl spirv_cross::CompilerGLSL::cast_to_variable_store(unsigned int,class std::basic_string<char,struct std::char_traits,class std::allocator > &,struct spirv_cross::SPIRType const &)" (?cast_to_variable_store@CompilerGLSL@spirv_cross@@MEAAXIAEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBUSPIRType@2@@Z)
1>Hazel.lib(OpenGLShader.obj) : error LNK2001: unresolved external symbol "protected: virtual void __cdecl spirv_cross::CompilerGLSL::cast_from_variable_load(unsigned int,class std::basic_string<char,struct std::char_traits,class std::allocator > &,struct spirv_cross::SPIRType const &)" (?cast_from_variable_load@CompilerGLSL@spirv_cross@@MEAAXIAEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBUSPIRType@2@@Z)
1>..\bin\Release-windows-x86_64\Hazelnut\Hazelnut.exe : fatal error LNK1120: 6 unresolved externals
1>Done building project "Hazelnut.vcxproj" -- FAILED.

while building Hazel.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the VS2019 linker output for Hazel.lib and OpenGLShader.obj, focusing on the six unresolved spirv_cross::CompilerGLSL symbols. Trace how the SPIRV-Cross library is included in the Hazel build and reproduce the Release-windows-x86_64 build; done means Hazelnut.exe links successfully without those errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.