Author Topic: cannot find compiler  (Read 10800 times)

Offline markm

  • Single posting newcomer
  • *
  • Posts: 5
cannot find compiler
« on: October 10, 2011, 12:57:55 pm »
Hi all
I am still quite new to code::Blocks and C++ in general so please excuse my ignorance in some of this.

I Have just reinstalled code blocks in c:\codeblocks  (i.e. on the root directory not in program files) on W7
(32 bit) but when I try to compile a simple "hello world" I get the following error

Linking console executable: bin\Debug\new.exe
mingw32-g++.exe: C:\programfiles\codeblocks\mingw: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

my windows path variables are set thus:

Path=C:\Program Files\AMD APP\bin\x86;C:\Program Files\Common Files\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Windows Live\Shared;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files\Autodesk\Backburner\;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Universal Extractor;C:\Program Files\Universal Extractor\bin;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\cygwin\bin;c:\codeblocks\mingw

MINGWDIR=C:\codeblocks\mingw

global compiler settings in C::B is set to point to:

Toolchain executables: C:\CodeBlocks\MinGW (autodetect)

does anyone know why codeblocks is still trying to find the compiler in  C:\programfiles\codeblocks
instead of C:\codeblocks

Is this something to do with a configuration file perhaps and how do I edit it

Regards Mark


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: cannot find compiler
« Reply #1 on: October 10, 2011, 01:16:26 pm »
Are you sure you're using the right compiler in you project/targets?
(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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: cannot find compiler
« Reply #2 on: October 10, 2011, 01:17:08 pm »
c:\cygwin\bin;c:\codeblocks\mingw
This is a very dangerous combination, btw.

Generally, make sure you select the right path for the right compiler. Maybe within your project you use a different compiler than you setup? Also, you can point to it directly not using auto-detect.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline markm

  • Single posting newcomer
  • *
  • Posts: 5
Re: cannot find compiler
« Reply #3 on: October 10, 2011, 02:49:28 pm »
Hi All

Many thanks for your help. I have cured it but by a rather odd method. I set the build options in the project to
point to a compiler that isn't even installed on my system and as expected got a message that it didn't exist
then switched it back too GCC as before. and it compiled perfectly.

All very strange.

BTW a bit off topic but how should I uninstall the cygwin environment I agree that having it is a bit dangerous.

Regards Mark


Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: cannot find compiler
« Reply #4 on: October 10, 2011, 03:24:16 pm »
BTW a bit off topic but how should I uninstall the cygwin environment I agree that having it is a bit dangerous.
You don't need to un-install Cygwin for this purpose, just remove both (!) compiler directories from the PATH environment variable -> accessible if you right click on "my computer" and select "properties", then search for environment variables.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ