SFML community forums
Help => Graphics => Topic started by: kingwolf112 on November 26, 2023, 02:27:39 am
-
When trying to run a program after compiling with sfml 2.6.1 mingw , i cannot find this file anywherre?
Why is this error generated. The program is the hello world program for sfml.
Please guide.
Regards
-
If you download MinGW version of SFML from SFML homepage, you will find it under bin folder.
-
Why is this file not generated when i compile it myself? Thats my query.
-
Assuming your title is a typo and you're not actually looking smfl but sfml-graphics-2.dll.
When you build SFML as shared library (i.e. not static), then you'll get dlls including sfml-graphics-2.dll, not sure where you're looking for it exactly.
Personally I recommend setting CMAKE_INSTALL_PREFIX to a custom location and then run the install target, which will copy all the relevant files from the build directory to the specified output directory.
The DLLs will then be in the bin/ directory.
-
i did set the cmake-INSTALl-prefix to a custom location, oddly no file gets copied there.
I am building as it as a shared library and sfml-graphics-2.dll does not get generated
-
With mingw on sfml-grapichs-2.dll i get this error while compiling:
[ 53%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Text.cpp.obj
[ 53%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/VertexArray.cpp.obj
[ 54%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/VertexBuffer.cpp.obj
[ 54%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/RenderTextureImpl.cpp.obj
[ 55%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/RenderTextureImplFBO.cpp.obj
[ 56%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/RenderTextureImplDefault.cpp.obj
[ 56%] Building RC object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/sfml-graphics.rc.obj
[ 57%] Linking CXX shared library ..\..\..\lib\sfml-graphics-d-2.dll
D:/mingw/winlibs-x86_64-posix-seh-gcc-13.2.0-llvm-16.0.6-mingw-w64ucrt-11.0.0-r1/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/sfml/SFML-2.6.1-sources/SFML-2.6.1/extlibs/libs-mingw/x64/libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x5614): undefined reference to `_setjmp'
D:/mingw/winlibs-x86_64-posix-seh-gcc-13.2.0-llvm-16.0.6-mingw-w64ucrt-11.0.0-r1/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/sfml/SFML-2.6.1-sources/SFML-2.6.1/extlibs/libs-mingw/x64/libfreetype.a(smooth.c.obj):smooth.c:(.text+0x77a): undefined reference to `_setjmp'
collect2.exe: error: ld returned 1 exit status
mingw32-make[2]: *** [src\SFML\Graphics\CMakeFiles\sfml-graphics.dir\build.make:602: lib/sfml-graphics-d-2.dll] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:582: src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/all] Error 2
mingw32-make: *** [makefile:165: all] Error 2
-
Found the answer @
https://en.sfml-dev.org/forums/index.php?topic=28265.0
-
please support ucrt runtime
-
The solution is to also compile the SFML dependancies using the
https://github.com/eXpl0it3r/SFML-dependencies/wiki
The dependancies come pre compiled , hence no support for UCRT.