I can't seem to find the option to disable debug builds. I let Dev-CPP 'auto' turn them on (when starting the built in Debugger) but now i can't turn it off. I edited the make files manually (where it says CC=gcc.exe -D__DEBUG__ but whenever i start dev-cpp it just puts them back in, so there must be an option 'some' where ... So unless i overlooked something, I can't seem to find anything to disable the debuger (to build a final, debug symbol free binary)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
that IS at no ...
besides, why would that be at Linker options? As the compiler compiles the code with -D__DEBUG__ ... wouldn't it be under compile options?
that's why it's so confusing : )
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2004-06-03
The __DEBUG__ macro definition does not control whether debug information is compiled, it is merely set by the IDE when debug information is requested in order that you can build different code for debug builds than for release builds using pre-preocessor code such as:
#if defined __DEBUG__
...
#endif
The option that controls debug information is -g. When debug is requested the IDE sets both -g and -D__DEBUG__.
However you are correct in that -g is a compiler option not a linker option. The linker can remove debug information compiled into object files using -S(strip debug symbols) or -s(strip all symbols). So the linker is relevant, but I in actual fact Dev-C++ does not insert either of these symbols when debug is disabled.
Clifford.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I can't seem to find the option to disable debug builds. I let Dev-CPP 'auto' turn them on (when starting the built in Debugger) but now i can't turn it off. I edited the make files manually (where it says CC=gcc.exe -D__DEBUG__ but whenever i start dev-cpp it just puts them back in, so there must be an option 'some' where ... So unless i overlooked something, I can't seem to find anything to disable the debuger (to build a final, debug symbol free binary)
Goto Tools->Compiler Options->Settings->Linker->Generate Debugging Info->No
:)
that IS at no ...
besides, why would that be at Linker options? As the compiler compiles the code with -D__DEBUG__ ... wouldn't it be under compile options?
that's why it's so confusing : )
The __DEBUG__ macro definition does not control whether debug information is compiled, it is merely set by the IDE when debug information is requested in order that you can build different code for debug builds than for release builds using pre-preocessor code such as:
#if defined __DEBUG__
...
#endif
The option that controls debug information is -g. When debug is requested the IDE sets both -g and -D__DEBUG__.
However you are correct in that -g is a compiler option not a linker option. The linker can remove debug information compiled into object files using -S(strip debug symbols) or -s(strip all symbols). So the linker is relevant, but I in actual fact Dev-C++ does not insert either of these symbols when debug is disabled.
Clifford.