I trying to build code, similair to “Vulkan Guide. Chapter 2. Improving the render loop”, but without using CMake, only with Visual Studio tools (as i don’t want to make code building dependent on CMake – don’t wanna rely on it).
So there is “Additional Include Directories” parameters:
$(ProjectDir)sourcethirdPartyVkBootstrap-15.08.2024;
$(ProjectDir)sourcethirdPartyfmt-11.0.2include;
$(ProjectDir)sourcethirdPartyVulkanMemoryAllocator-3.1.0include;
C:VulkanSDK1.3.290.0Include;
$(ProjectDir)sourcecode;
%(AdditionalIncludeDirectories)
As “additonal library directories” there is:
C:VulkanSDK1.3.290.0Lib; %(AdditionalLibraryDirectories)
As “additional dependencies” there is:
C:VulkanSDK1.3.290.0Libvulkan-1.lib; $(CoreLibraryDependencies);%(AdditionalDependencies)
Plus /utf-8
as additional compiler option.
Also Linker -> System -> SubSystem set as Windows
Folders of unabled to link libraries looks like this:
fmt
VkBootstrap
So in this path also lying VulkanMemoryAllocator lib, but is is working and linker don’t have error with her:
VMA
In VulkanSDK
there is pre-installed glm
library and it works fine, but pre-installed SDL2
lib for somewhat reason also gives LNK error.
Errors looks like this:
1>vk_engine.obj : error LNK2019: unresolved external symbol "void __cdecl fmt::v11::detail::vprint_mojibake(struct _iobuf *,class fmt::v11::basic_string_view<char>,class fmt::v11::basic_format_args<class fmt::v11::context>,bool)" (?vprint_mojibake@detail@v11@fmt@@YAXPEAU_iobuf@@V?$basic_string_view@D@23@V?$basic_format_args@Vcontext@v11@fmt@@@23@_N@Z) referenced in function "void __cdecl fmt::v11::println<char const *>(struct _iobuf *,class fmt::v11::basic_format_string<char,char const *>,char const * &&)" (??$println@PEBD@v11@fmt@@YAXPEAU_iobuf@@V?$basic_format_string@DPEBD@01@$$QEAPEBD@Z)
1>vk_engine.obj : error LNK2019: unresolved external symbol "void __cdecl fmt::v11::vprintln(struct _iobuf *,class fmt::v11::basic_string_view<char>,class fmt::v11::basic_format_args<class fmt::v11::context>)" (?vprintln@v11@fmt@@YAXPEAU_iobuf@@V?$basic_string_view@D@12@V?$basic_format_args@Vcontext@v11@fmt@@@12@@Z) referenced in function "void __cdecl fmt::v11::println<char const *>(struct _iobuf *,class fmt::v11::basic_format_string<char,char const *>,char const * &&)" (??$println@PEBD@v11@fmt@@YAXPEAU_iobuf@@V?$basic_format_string@DPEBD@01@$$QEAPEBD@Z)
1>vk_engine.obj : error LNK2019: unresolved external symbol SDL_CreateWindow referenced in function "public: void __cdecl VulkanEngine::init(void)" (?init@VulkanEngine@@QEAAXXZ)
Screenshot of them:
errors
So i tried to add SDL2.lib
from Vulkan lib folder to “additional dependencies” parameter but aint helped – just gave error “could not open .lib file”.
Tried a lot of mixing around with parameters but none helped.
And i can’t really see, what problem can be here as VkBootstrap, for example, is just 3 files, so i can’t understand how they can cause “unresolved external symbols” after their include. And i searched for function that was “unresolved” – this function perfectly exists in file, so it should be easily found idk why linker so mean to me
Levmur Flatazara is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
6