[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-debug-dev] Using Eclipse/CDT with GDB.
|
I am trying to get the GDB to work with eclipse. I have version
2.0.2 of eclipse and CDT
org.eclipse.cdt-200212181146-win32_1.0.1.bin.dist.zip
the latest stable version I think and the latest MingW (I can get the
version if it matters).
I have basically tried the sample cpp code on the FAQ and I have a
slightly modified Makefile (which builds nonetheless), however, on
debug, I get...
"Unable to set temporary breakpoint in main. Reason: No symbol table
loaded. Use "file" command. Continue?"
However I have included "-g3" in my makefile to get gcc to generate the
debug information.
Do you have any idea why this isn't working?
Below are my source and makefile...
LIBS = -L"C:\MinGW\lib\gcc-lib\mingw32\3.2" -lstdc++
OBJ = hello.o
CFLAGS = -g3
GCC = gcc
hello : $(OBJ)
$(GCC) $(CFLAGS) -o hello.exe $(OBJ) $(LIBS)
$(OBJ) : hello.cpp
$(GCC) $(CFLAGS) -c hello.cpp
all :
${MAKE} hello
.PHONY : clean
clean :
rm -rf hello.exe $(OBJ)
///////////////////////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
char buff[128];
cout << "Hello World!\n";
cin >> buff;
return (0);
}