Why does my program compile, when all of the compiler options (gcc, g++, make, etc) point to Dev-Cpp/bin, which is empty except for rm.exe ?
Is this related to the fact that all my Windows API libraries for the compiler used by Dev-Cpp disappeared since last year, and the debugger has stopped working?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2007-08-17
Probably because C:/util/OS/Cygwin/bin (or wherever GCC was installed) is in the PATH environment variable, but the location of gdb is not.
>> Why does specifying the locations of programs (including gcc and gdb)
>> in Dev-Cpp's "compiler options" window not do anything?
These setting affect newly created projects, and single sources compiled without a project (not recommended). For pre-existing projects you have to change the settings in the project options (on the Project menu) menu. Beyond that, anything you set in the PATH environment variable will override the Dev-C++ settings, since Dev-C++ appends its settings to PATH during the build, it should perhaps prepend (but doesn't). One solution is to make the paths explicit in the "Programs" settings.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Answer: I installed Dev-Cpp with MinGW. Then I replaced my hard drive, installed Dev-Cpp without MinGW, and forgot that I had done so. Uninstalling DevCpp, and installing the version with MinGW, put it back to how it was before.
The remaining question is: Why was it able to find Cygwin's gcc and use it to compile, but not able to find Cygwin's gdb (in same bin directory), and use it to debug? A related question is: Why does specifying the locations of programs (including gcc and gdb) in Dev-Cpp's "compiler options" window not do anything?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Why does my program compile, when all of the compiler options (gcc, g++, make, etc) point to Dev-Cpp/bin, which is empty except for rm.exe ?
Is this related to the fact that all my Windows API libraries for the compiler used by Dev-Cpp disappeared since last year, and the debugger has stopped working?
Dev-Cpp version 4.9.9.2
Compile log:
Compiler: Default compiler
Building Makefile: "C:\Phil\code\bioinfo\GenomeScan\src\Makefile.win"
Finding dependencies for file: C:\Phil\code\bioinfo\GenomeScan\src\main.cpp
Finding dependencies for file: C:\Phil\code\bioinfo\GenomeScan\src\BitArray\bitarray.cpp
Finding dependencies for file: C:\Phil\code\bioinfo\GenomeScan\src\dna.cpp
Finding dependencies for file: C:\Phil\code\bioinfo\GenomeScan\src\dnaerr.cpp
Executing make...
make.exe -f "C:\Phil\code\bioinfo\GenomeScan\src\Makefile.win" all
g++.exe -D__DEBUG__ -c dna.cpp -o dna.o -fexceptions -fexpensive-optimizations -O2 -g3 -march=pentium4
g++.exe -D__DEBUG__ -c dnaerr.cpp -o dnaerr.o -fexceptions -fexpensive-optimizations -O2 -g3 -march=pentium4
g++.exe -D__DEBUG__ main.o BitArray/bitarray.o dna.o dnaerr.o -o "..\bin\GenomeScan.exe" -L"C:/util/OS/Cygwin/lib" -L"C:/util/OS/Cygwin/usr/lib" -g3 -march=pentium4
Execution terminated
Compilation successful
Probably because C:/util/OS/Cygwin/bin (or wherever GCC was installed) is in the PATH environment variable, but the location of gdb is not.
>> Why does specifying the locations of programs (including gcc and gdb)
>> in Dev-Cpp's "compiler options" window not do anything?
These setting affect newly created projects, and single sources compiled without a project (not recommended). For pre-existing projects you have to change the settings in the project options (on the Project menu) menu. Beyond that, anything you set in the PATH environment variable will override the Dev-C++ settings, since Dev-C++ appends its settings to PATH during the build, it should perhaps prepend (but doesn't). One solution is to make the paths explicit in the "Programs" settings.
Clifford
Answer: I installed Dev-Cpp with MinGW. Then I replaced my hard drive, installed Dev-Cpp without MinGW, and forgot that I had done so. Uninstalling DevCpp, and installing the version with MinGW, put it back to how it was before.
The remaining question is: Why was it able to find Cygwin's gcc and use it to compile, but not able to find Cygwin's gdb (in same bin directory), and use it to debug? A related question is: Why does specifying the locations of programs (including gcc and gdb) in Dev-Cpp's "compiler options" window not do anything?