Greetings, I am writing this thread, because I am unable to compile the SDL2 static lib. I tried following the instructions here: https://stackoverflow.com/a/66523216/13012588
But I am met with the following errors:
62 linker errors of unresolved external symbol _fltused
1 linker error of unresolved external symbol _DllMainCRTStartup
1 linker error of 2 unresolved externals (presumably the two above)
I have also tried the CMake options
-DLIBC=ON as well as
-DFORCE_STATIC_VCRT=ON, as I saw from another topic, but I believe it didn’t make a difference, as CMake threw a warning along the lines of:
Manually-specified variables were not used by the project:
Might somebody be able to tell me what I am doing wrong? I placed the
#define HAVE_LIBC 1 right above the
#if HAVE_LIBC statement, so I don’t think that’s wrong… I am using Visual Studio 2022 and Windows 11, if it helps.
EDIT (hopefully the final one): I did it with the CMake GUI and set the LIBC and FORCE_STATIC_VCRT variables to on from there, and for some reason it worked
#define HAVE_LIBC1 was there on its own and the compilation worked. Thank you and I apologize for disturbing.