Hello, I have a C file which code blocks runs like this -
gcc.exe -c file.c -o file.o
mingw32-g++.exe -o file.exe file.o
I want it to to run it like I do at at command line.
gcc file.c -o file
file
Is this possible in code blocks?
Also, it is just a common file, not in a project.
Settings -> Compiler -> Your default compiler -> Toolchain executable -> Linker -> mingw32-gcc.exe
But if you intend to make c++ project your linking will fail.
p.s. next time search the forum, it has been answered many times.
@obfuscated, I have already set that.
What I basically want is only file.exe to be created when compiling, not file.o, and code blocks always creates a ".o" file as well.
Anyways, its just whim of mine, I can live with the ".o" files as well, just think they are useless.
Code blocks is a mighty good ide otherwise.
Quote from: xylon97 on June 25, 2013, 02:30:10 PM
What I basically want is only file.exe to be created when compiling, not file.o, and code blocks always creates a ".o" file as well.
No, I don't think it would be possible without massive changes to the compiler plugin (but I'm not compiler plugin expert).
Quote from: oBFusCATed on June 25, 2013, 02:40:41 PM
No, I don't think it would be possible without massive changes to the compiler plugin (but I'm not compiler plugin expert).
It is possible by defining a Tool command (actually compiler command) that uses macros - i.e. the currently open / active editor.
Look at the tools/tools+ plugin (docs).