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

Author Topic: Bug in CMake with MinGW-w64 GCC 8.1  (Read 2704 times)

0 Members and 1 Guest are viewing this topic.

thecheeselover

  • Newbie
  • *
  • Posts: 24
    • View Profile
Bug in CMake with MinGW-w64 GCC 8.1
« on: June 10, 2018, 09:38:09 pm »
Using the MinGW-w64 compiler for GCC 8.1.0 (seh, posix), I tried to setup the Code::Blocks project from the source files of SFML 2.5.0.

  • I downloaded the code source for SFML 2.5.0 on my Windows 10 machine
  • I downloaded CMake GUI and set up the correct source path and output for generating the Code::Blocks  project (MinGW makefiles)
  • I checked the specify native compilers option
  • I then selected x86_64-w64-mingw32-gcc.exe for the C compiler and x86_64-w64-mingw32-g++.exe for the C++ compiler
  • An error would then popup after clicking ok, saying : "Error in configuration process, project files may be invalid"
  • In the log file, the error only says that gcc returned 1.

I tried the same thing but with the TDM GCC 5.1.0-3 64 bit compiler and got no errors.

Did I do something wrong or CMake or SFML CMake files have errors?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Bug in CMake with MinGW-w64 GCC 8.1
« Reply #1 on: June 10, 2018, 10:05:25 pm »
Just picking the compilers doesn't work. You need to fully switch the toolchain, by having the compiler's bin directory in PATH.

Since I work with many different variants of MinGW, I tend to not have any of them in PATH and only temporarily add one when I need it by calling set PATH=<path to compiler>\bin;%PATH%

MinGW-w64 GCC 8.1.0 (POSIX, SEH) from MinGW Builds works fine for me.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

thecheeselover

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Bug in CMake with MinGW-w64 GCC 8.1
« Reply #2 on: June 11, 2018, 12:46:02 am »
I confirm what you said. It works if I put one of my compilers bin directory in PATH. The order matters if there are many. It also works with the default (autodetected) compiler.

Thank you very much.

 

anything