User forums > Using Code::Blocks
Different method of compiling
(1/1)
xylon97:
Hello, I have a C file which code blocks runs like this -
--- Code: ---gcc.exe -c file.c -o file.o
mingw32-g++.exe -o file.exe file.o
--- End code ---
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.
oBFusCATed:
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.
xylon97:
@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.
oBFusCATed:
--- 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.
--- End quote ---
No, I don't think it would be possible without massive changes to the compiler plugin (but I'm not compiler plugin expert).
MortenMacFly:
--- 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).
--- End quote ---
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).
Navigation
[0] Message Index
Go to full version