Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

codeblocks can't find my compiler

Tags:

c

gcc

codeblocks

OK, so I downloaded Codeblocks and I already have a cygwin terminal on my computer that I regularly use to compile and run C programs, but when I try to build a program in CodeBlocks, it gives me an error:

The compiler's setup (GNU GCC Compiler) is invalid, so Code::Blocks cannot find/run the compiler.

I don't know why it can't find my compiler or why it's looking for GNU GCC compiler when I have Cygwin GCC as the default compiler.

like image 578
lbomb22 Avatar asked Mar 10 '14 19:03

lbomb22


2 Answers

I faced the same problem. I have fixed out by going to Setting -> Compiler -> Global Compiler Settings -> Toolchain Execuatables (tab). There, click on Program Files and then rename C compiler to gcc.exe and C++ compiler to g++.exe.

like image 74
SilverSurfer Avatar answered Sep 21 '22 03:09

SilverSurfer


I know this is an old question but let me see if I can help. First of all, on the download page make sure you downloaded codeblocks-13.12mingw-setup.exe and NOT codeblocks-13.12-setup.exe. Of course the version numbers may change but pay attention to the name. Then after installing codeblocks, go to Settings->Compiler->Toolchain executables. From here, change the C compiler to gcc.exe and C++ compiler to g++.exe. Hope this helps anyone else going through this problem :-)

like image 32
Patrice Andala Avatar answered Sep 21 '22 03:09

Patrice Andala