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

Author Topic: Trying To Figure Out How To Compile SFML with GCC 9.3  (Read 1957 times)

0 Members and 1 Guest are viewing this topic.

nathanmyersc

  • Newbie
  • *
  • Posts: 11
    • View Profile
Trying To Figure Out How To Compile SFML with GCC 9.3
« on: April 09, 2020, 03:30:30 pm »
Hello i have been trying to compile sfml with both gcc 9.3 32 bit and 64 bit. Not having much luck
i used msys2 to download the 32 bit and 64 bit version of MINGW
its updated. i can use [for(THING a = THING();double x : a.listOfNumbers){//dostuff}]  a gcc 9 compiler addition. i assume compiler works.

No real clue about cmake or the cmake list or anything. But i have managed to compile sfml once before to a non precompiled compiler version.

CMAKE IN GUI ERROR OUTPUT
Quote
The C compiler identification is GNU 9.3.0
The CXX compiler identification is GNU 9.3.0
System is unknown to cmake, create:
Platform/Windows 10 to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
Your CMakeCache.txt file was copied to CopyOfCMakeCache.txt. Please post that file on discourse.cmake.org.
Check for working C compiler: D:/CODING/COMPILER/mingw32/bin/gcc.exe
System is unknown to cmake, create:
Platform/Windows 10 to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
Check for working C compiler: D:/CODING/COMPILER/mingw32/bin/gcc.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/CMakeTestCCompiler.cmake:60 (message):
  The C compiler

    "D:/CODING/COMPILER/mingw32/bin/gcc.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: D:/CODING/SFMLOUTPUT/CMakeFiles/CMakeTmp
   
    Run Build Command(s):D:/CODING/COMPILER/mingw32/bin/make.exe cmTC_88135/fast && D:/CODING/COMPILER/mingw32/bin/make.exe -f CMakeFiles/cmTC_88135.dir/build.make CMakeFiles/cmTC_88135.dir/build

    make[1]: Entering directory 'D:/CODING/SFMLOUTPUT/CMakeFiles/CMakeTmp'

    process_begin: CreateProcess(NULL, sh.exe -c "/C/Program Files/CMake/bin/cmake.exe -E cmake_echo_color --switch= --progress-dir=/D/CODING/SFMLOUTPUT/CMakeFiles/CMakeTmp/CMakeFiles --progress-num=1 Building C object CMakeFiles/cmTC_88135.dir/testCCompiler.c.obj", ...) failed.

    make (e=2): The system cannot find the file specified.


    make[1]: *** [CMakeFiles/cmTC_88135.dir/build.make:82: CMakeFiles/cmTC_88135.dir/testCCompiler.c.obj] Error 2

    make[1]: Leaving directory 'D:/CODING/SFMLOUTPUT/CMakeFiles/CMakeTmp'

    make: *** [Makefile:138: cmTC_88135/fast] Error 2

   
   

 

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


Configuring incomplete, errors occurred!
See also "D:/CODING/SFMLOUTPUT/CMakeFiles/CMakeOutput.log".
See also "D:/CODING/SFMLOUTPUT/CMakeFiles/CMakeError.log".

I pondered if sh.exe was missing
Or the program was messing up the address of cmake.exe with /c/p... instead of c:/p... but perhaps that doesnt matter.
I pondered i was missing a prerequisite for sfml.

I copied random cmakelist.txts for compiling sfml. but no difference in output.

Like i said i have no clue about this aspect. Hope you might be able to help me :). thanks.
« Last Edit: April 09, 2020, 04:57:01 pm by nathanmyersc »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Trying To Figure Out How To Compile SFML with GCC 9.3
« Reply #1 on: April 09, 2020, 09:17:54 pm »
MSYS2 is more than just a package manager, it's a fully on environment, so if you commit to it, you'll have to fully commit to it and also use the cmake provided by the MSYS2 package manager, IIRC they also have SFML builds.

SFML itself doesn't really support building SFML with MSYS2, as such I can't help you much further there. Unfortunately GCC 9.x isn't yet otherwise available for Windows it seems, so it might be better to just use an older version and wait for a while or use MSVC and optionally clang.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

nathanmyersc

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Trying To Figure Out How To Compile SFML with GCC 9.3
« Reply #2 on: April 10, 2020, 12:22:38 am »
Hey Thanks For Your Comment.
Silly enough through my layman tinkering i actually managed to compile sfml with gcc 9.3 in both 32 bit and 64 bit. Good to know i think i have a method that works without fuss.

What i did was i use codeblocks. I changed the default compiler to the appropiate one. And used codeblocks-mingw settings in cmake and it miraciously worked after so much trouble.
So i can use codeblocks as a tool to mediate the compiler change. Because obviously when i was trying to do it with non default settings i was missing something.

 

anything