Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: flariut on December 03, 2009, 02:49:59 pm

Title: How do I compile .c with gcc.exe
Post by: flariut on December 03, 2009, 02:49:59 pm
Hi there, im using C::B 8.02 in Windows XP and MinGW, and I've got a question:
How I configure C::B so that .c files get compiled with gcc.exe or mingw32-gcc.exe ? Compiling it from a C Console project works, but if I open a random .c file and then compile it, it gets compiled with g++...

My compiler config looks like this:

Code
[Toolchain Executables / Program Files]
C Compiler: mingw32-gcc.exe
C++ Compiler: mingw32-g++.exe
Linker for dynamic libs: mingw32-g++.exe
...

Thanks in advance, Mariano (Argentina)
Title: Re: How do I compile .c with gcc.exe
Post by: oBFusCATed on December 03, 2009, 04:35:53 pm
I think this is fixed in the nightly builds.

There is a workaround:
1. choose your file
2. right click
3. properties
4. find where it states the type of the file, should be CC/CPP
5. switch it to C

I don't have CB, so the instructions could not be 100% correct.

Best regards
Title: Re: How do I compile .c with gcc.exe
Post by: flariut on December 04, 2009, 01:45:59 pm
I updgraded my C::B to "11 November 2009 build (5911)" and now everything works like a charm.

Thanks!