Reputation: 29
i work on Windows x64 with cmake and Mscv compiler Version 19.28.29913.
I included SDL and SDL_image as submodules in my project. All works fine until i tried to build SDL_image into my project.
My CMakeLists.txt looks like following
...
#add SDL_image drectory
add_subdirectory(SDL_image)
add_executable(${PROJECT_NAME} src/main.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE SDL2::SDL2 SDL2::image)
The linker complains several LNK2019 and LNK2001 errors.
For instance that he cant find symbols for "longjmp" in Function "IMG_LoadPNG_RW"
Error LNK2019 not resolved external symbol "longjmp" in function "IMG_LoadPNG_RW". C:\Dev\C++\Project\out\build\x64-Debug\Game C:\Dev\C++\Project\out\build\x64-Debug\IMG_png.c.obj 1
I pulled SDL2 and SDL_image from SDL github reop.
Do i have to link additional libraries?
Does anyone know how to fix this?
Upvotes: 0
Views: 449