User forums > General (but related to Code::Blocks)
Moving to GCC question
thomas:
--- Quote from: troels on January 19, 2006, 02:22:38 pm ---Thomas just closed (threw out) my 'bug' report:
https://sourceforge.net/tracker/?func=detail&atid=707416&aid=1409127&group_id=126998
"...IDE built specifically to meet the most demanding needs of its users"
Guess I'm too demanding then. I need my IDE/compiler to be fairly compatible with other compilers (MS).
--- End quote ---
You see, several people already told you. It is not a bug, neither in the IDE, nor in the compiler. You are not using the tools properly.
A compiler is not a divination apparatus, and neither is an IDE. If you put your files into some folder, then the compiler won't know unless you tell it.
Maybe Visual Studio does that differently (maybe they have the search path ../include built-in, I don't know), but this is not standard, and it is not correct.
The reason why the compiler does not scan large portions of your hard disk and use whatever files it can find is that you may have many different headers with the same name (for example there is a file string.h in the wxWidgets headers and a file with the same name in the system headers. You might even have a file with that same name too, although that would be bad design).
If the compiler just looked in arbitrary places and use whatever it happens to find, you would have a terrible mess every time.
The correct way of operation for a compiler is to have a clearly defined set of search paths (and a clearly defined order), so there is no question about which one to use.
Consequently, the correct way of operation for you is to tell the compiler what you want. If you don't do that, the compiler will not work properly.
thomas:
--- Quote from: mandrav on January 19, 2006, 03:24:53 pm ---Although I refuse to consider this as a bug but rather lack of configuration from the user's part, the fix has been committed.
--- End quote ---
Now we do have a bug... :?
tiwag:
@thomas : why do you think it's a bug, when CB adds the module's path to the compiler's include directories by default ???
thomas:
Because it is not right to add a path secretly. Although it will probably (hopefully) never cause a problem in this particular case, it still is not right. You don't know where it is inserted (first, last...?) either. Well, you would know if you looked at the sources, but the point is you don't even know that it is happening.
If we start adding paths, then why don't we add ./include, ../include, and ../../include too? We might add ../src/include and ../source/include as well, then the people who put their project files in some subfolder would be happy.
Following the same reasoning, we could secretly add -lkernel32 to the linker options under Windows because practically all Windows applications need that anyway. Does really anybody think this would be a good idea?
Even if this include path likely causes no problem, is that what we want, is that the way it should be? I say no. The compiler should do exactly what you tell it to do, not perform any MS-style capers.
tiwag:
hehe :shock:
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version