Author Topic: 20.03 code::blocks mingw setup - cannot find compilers in MINGW bin  (Read 12883 times)

Offline chargino

  • Single posting newcomer
  • *
  • Posts: 3
Hi,

I installed Code::Blocks today for C++ using the latest version 'codeblocks-20.03mingw-32bit-setup.exe' on the website. When trying to set it up I've been getting "Environment Error - cannot find compiler".

I've gone into Settings > Compiler > Toolchain executables, the compiler installation directory is C:Program Files (x86)\CodeBlocks\MinGW. I've checked and this is where it is saved.

The tutorial I was following had the program files set as:

C compiler: mingw32-gcc.exe
C++ compiler: mingw32-g++.exe
Linker for dynamic libs: mingw32-g++.exe
etc.

However the MINGW bin folder as installed today does not have these file names in it. It has gcc.exe & g++.exe as well as x86_64-w64-mingw32-gcc.exe & x86_64-w64-mingw32-g++.exe - I have tried subbing both of these into the C and C++ compiler file fields but this gives the same error.

Does anyone know which files in the 20.03 version MINGW bin are the C and C++ compilers?

Thanks

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: 20.03 code::blocks mingw setup - cannot find compilers in MINGW bin
« Reply #1 on: April 06, 2020, 02:03:10 am »
http://forums.codeblocks.org/index.php/topic,23746.0.html

Something-gcc.exe is your c compiler, something-g++.exe is your c++ compiler...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline chargino

  • Single posting newcomer
  • *
  • Posts: 3
Re: 20.03 code::blocks mingw setup - cannot find compilers in MINGW bin
« Reply #2 on: April 06, 2020, 02:43:20 pm »
http://forums.codeblocks.org/index.php/topic,23746.0.html

Something-gcc.exe is your c compiler, something-g++.exe is your c++ compiler...

Hi oBFusCATed,

Thanks for the reply. I'm afraid I tried the two files with (etc)-gcc.exe and (etc)-g++.exe and it's still saying no compiler.

I don't know if this is significant but the error message says "failed to run (etc)-gcc.exe" which should be the C one when it should be compiling with the C++ one for this .cpp file... I have checked and they are the right way around on the compiler settings.

Not sure what to try next as those were the only files in the bin that looked like the right name!

Offline chargino

  • Single posting newcomer
  • *
  • Posts: 3
Re: 20.03 code::blocks mingw setup - cannot find compilers in MINGW bin
« Reply #3 on: April 06, 2020, 02:56:11 pm »
http://forums.codeblocks.org/index.php/topic,23746.0.html

Something-gcc.exe is your c compiler, something-g++.exe is your c++ compiler...

Ok just tried setting (etc)-gcc-8.1.0.exe in the C compiler path and (etc)-g++.exe in the C++ compiler paths and that's working now! File names were just not as expected haha

Cheers