Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: libgcc_s_dw2.dll is missing  (Read 7851 times)

0 Members and 1 Guest are viewing this topic.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: libgcc_s_dw2.dll is missing
« Reply #15 on: February 22, 2021, 09:31:36 am »
Then as I said, you need to compile SFML yourself.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

MaxPain

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: libgcc_s_dw2.dll is missing
« Reply #16 on: February 22, 2021, 04:22:50 pm »
How should i do this to avoid getting an error about Unrecognized file format?

Even I try to build self-build SFML version with 64bit compiler it says "undefined reference to SFML thing", I am sick of it. :'(
« Last Edit: February 22, 2021, 04:41:21 pm by MaxPain »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: libgcc_s_dw2.dll is missing
« Reply #17 on: February 22, 2021, 08:37:08 pm »
Personally, I wouldn't recommend cross-compilation, since it can be a lot of pain to get working properly and running Windows in a VM or on a different machine has also other benefits.

If you do want to keep cross-compiling, you'll need to get cmake, the SFML source code, configure CMake to use your MinGW compiler and follow the CMake tutorial on build SFML as a library with your current compiler.
Or did you actually already do that? Your post always left me a bit inconclusive about this.

I realized that it is more convenient to build on Windows, but I want to try because I'm the beginner.
Nothing is stopping you from trying stuff, but it's usually better to start on an easy level as a beginner, until you're more familiar with a topic and can understand why something is or isn't working on your own.
You also don't pick the hardest possible game mode and then complain and give up because you can't finish the first level, since you don't understand the required mechanics. ;)
« Last Edit: February 22, 2021, 08:39:01 pm by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

MaxPain

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: libgcc_s_dw2.dll is missing
« Reply #18 on: February 23, 2021, 07:11:29 am »
Fine, let's s deal with it now  :).

Cmake doesn't see my MinGW as generator even it's bin in path variables. Maybe cmake need special files that are not there.
« Last Edit: February 23, 2021, 07:14:33 am by MaxPain »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: libgcc_s_dw2.dll is missing
« Reply #19 on: February 23, 2021, 07:51:31 am »
For CMake you apparently habe to use a toolchain file and tell CMake you're cross-compiling.

https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling
https://metricpanda.com/rival-fortress-update-11-cross-compiling-for-three-platforms/

Feel free to google more along the lines of "macOS cmake cross-compiling"
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

MaxPain

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: libgcc_s_dw2.dll is missing
« Reply #20 on: February 23, 2021, 09:49:02 am »
I made the toolchain... And error

CMake Error at /Applications/CMake.app/Contents/share/cmake-3.20/Modules/CMakeTestCCompiler.cmake:66 (message):
  The C compiler

    "/usr/local/Cellar/mingw-w64/8.0.0_3/bin/i686-w64-mingw32-gcc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /Downloads/SFML-2.5.1-new/CMakeFiles/CMakeTmp
   
    Run Build Command(s):/usr/bin/make -f Makefile cmTC_4739f/fast && /Library/Developer/CommandLineTools/usr/bin/make  -f CMakeFiles/cmTC_4739f.dir/build.make CMakeFiles/cmTC_4739f.dir/build
    Building C object CMakeFiles/cmTC_4739f.dir/testCCompiler.c.obj
    /usr/local/Cellar/mingw-w64/8.0.0_3/bin/i686-w64-mingw32-gcc    -o CMakeFiles/cmTC_4739f.dir/testCCompiler.c.obj -c /Users/maxroschupkin/Downloads/SFML-2.5.1-new/CMakeFiles/CMakeTmp/testCCompiler.c
    Linking C executable cmTC_4739f.exe
    /Applications/CMake.app/Contents/bin/cmake -E cmake_link_script CMakeFiles/cmTC_4739f.dir/link.txt --verbose=1
    /Applications/CMake.app/Contents/bin/cmake -E rm -f CMakeFiles/cmTC_4739f.dir/objects.a
    /usr/bin/ar cr CMakeFiles/cmTC_4739f.dir/objects.a @CMakeFiles/cmTC_4739f.dir/objects1.rsp
    ar: @CMakeFiles/cmTC_4739f.dir/objects1.rsp: No such file or directory
    make[1]: *** [cmTC_4739f.exe] Error 1
    make: *** [cmTC_4739f/fast] Error 2
   
   

 

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:45 (project)

Upd: Fixed ;D
« Last Edit: February 23, 2021, 10:01:36 am by MaxPain »

MaxPain

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: libgcc_s_dw2.dll is missing
« Reply #21 on: February 23, 2021, 10:02:26 am »
Now I need mingw32-make, where can I find it?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: libgcc_s_dw2.dll is missing
« Reply #22 on: February 23, 2021, 11:46:58 am »
It might just be called make with your MinGW version.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

MaxPain

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: libgcc_s_dw2.dll is missing
« Reply #23 on: February 23, 2021, 11:51:59 am »
Nope, there is nothing like make or cmake thing at all.
« Last Edit: February 23, 2021, 12:03:49 pm by MaxPain »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: libgcc_s_dw2.dll is missing
« Reply #24 on: February 23, 2021, 12:56:46 pm »
Maybe it needs to be installed first.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

MaxPain

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: libgcc_s_dw2.dll is missing
« Reply #25 on: February 27, 2021, 06:46:14 am »
Everything is done.
First thing I create the CMake toolchain for cross compile

# Sample toolchain file for building for Windows

set(CMAKE_SYSTEM_NAME Windows)
#set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
#or 32 bit
set(TOOLCHAIN_PREFIX i686-w64-mingw32)

# cross compilers to use for C, C++
set(CMAKE_C_COMPILER     "/usr/local/Cellar/mingw-w64/8.0.0_3/bin/${TOOLCHAIN_PREFIX}-gcc")
set(CMAKE_CXX_COMPILER   "/usr/local/Cellar/mingw-w64/8.0.0_3/bin/${TOOLCHAIN_PREFIX}-g++")


# modify default behavior of FIND_XXX() commands
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

Then I use CMake to configure SFML source files

cmake ./ -DCMAKE_TOOLCHAIN_FILE=Path/to/toolchain/WindowsTool.cmake
 

Then just make it and compile

/usr/local/Cellar/mingw-w64/8.0.0_3/bin/i686-w64-mingw32-g++ main.cpp -DSFML_STATIC -static -L SFML-2.5.1-2/extlibs/libs-mingw/x86 -L SFML-2.5.1-2/lib -o test.exe -lsfml-audio-s -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -lws2_32 -lopengl32 -lgdi32 -lwinmm -lfreetype -lflac -lvorbisenc -lvorbisfile -lvorbis -logg -lopenal32 -I SFML-2.5.1-2/include -v
 

Thanks eXpl0it3r for help :D