User forums > General (but related to Code::Blocks)
Moving to GCC question
troels:
--- Quote from: mandrav on January 20, 2006, 09:52:12 am ---* Added compiler-independent option to explicitely add the currently compiling file's directory to the compiler's search dirs
Autotools do change the working dir to the file's dir also, like MSVC
--- End quote ---
After a good long time to think I cannot think of any reason not to do it like autotools and MSVC.
In other words, how about removing this option? Just make the default to change the dir to the compiling file's dir when compiling. This seems natural and would bring CB in step with the other tools.
Regards
Ceniza:
--- Quote from: troels ---After a good long time to think I cannot think of any reason not to do it like autotools and MSVC.
In other words, how about removing this option? Just make the default to change the dir to the compiling file's dir when compiling. This seems natural and would bring CB in step with the other tools.
--- End quote ---
The main reason it isn't implemented by default is because having an IDE that does that kind of tricks at your back is evil. Generalizing: any software that does that kind of things is evil.
As usual some people like it, some others not, that's why it's an option... and since it's really evil, it's disabled by default :D
troels:
Just for the record:
This is not a about adding a dir to the include list (evil).
Think setcwd. This is about launching the compiler, gcc.exe or whichever, in the dir of the module to be compiled, instead of launching it in some mother dir (the .cbp dir).
yop:
This would also save a few more annoying things like when building from Makefiles the compiler reports the errors/warnings from the build/sources dir and then when c::b handles them it searches for the file in the wrong path (clicking on the error does not open the respective file). This is kind of the standard way that any Makefile generator (qmake/bakefile/autotools) handles builds. I don't really know what advantages the current approach has so I might be missing something.
takeshimiya:
So now I understand, it's about
--- Code: ---cd WhereTheFileIs/file.cpp
gcc file.cpp
--- End code ---
instead of
--- Code: ---gcc -IWhereTheFileIs file.cpp
--- End code ---
right?
This makes sense, and it's valid not only for gcc or any other compiler, but for any language, build tool or interpreter.
troals: I'd say leave the option but change the default.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version