Good morning, I am new to this forum.
I am not able to correctly build the SFML libraries and obtain an equivalent of the prebuilt windows binaries.
I use SFML in an external CMake project and I always used the prebuilt version for the
Debug and
Release configurations. Now, I really need the
RelWithDebInfo configuration and with the prebuilt version I get the error "Stack cookie instrumentation code detected a stack-based buffer overrun" when running my executable (see this topic with a similar problem
https://en.sfml-dev.org/forums/index.php?topic=27220.0).
I think I should recompile the SFML libraries in the configurations I need and with the same compiler, so I tried.
How I am tring to build the SFMLI downloaded the latest source from the "master" branch, I opened the CMake project with Visual Studio 2019 and I created the desidered configurations.
I've read the tutorial (
https://www.sfml-dev.org/tutorials/2.5/compile-with-cmake.php) and I think the default values for the SFML's CMake variables are fine.
I've built all targets and then I clicked "install SFML".
In the install folder I see the "bin" folder with the SFML DLLs and the openal32 dll, in the lib folder I see some expected .lib and the cmake folder.
The problemI've updated the PATH and built my CMake project without any problem but when I run the program I get some errors for missing some dlls (freetype.dll, bz2.dll and libpng16.dll).
I found that these dlls are in the build folder, I didn't expect those dlls, but perhaps I'm missing somethig. Anyway, to solve the problem, I tried to copy these dlls in the install bin folder (but in the prebuilt version they are not present).
At this point if I run my program I get an error for not finding the inflateValidate entry point in the libpng16.dll and I don't know what to do.
Another doubtIf I set BUILD_SHARED_LIBS to false, I still get the shared version of the libraries
Thanks in advance, I hope I am not wasting your time.