I am new to CodeBlocks, and try to work with the debugger an de following simple code.
#include <iostream>
using namespace std;
int main()
{
int q=100;
int *p;
char c;
cout << "Hello world!" << endl; //Breakpoint 1
p= new (nothrow) int [q];
if (p == 0)
cout << "Error: memory could not be allocated";
else {
for (int i=0; i<q; i++)
p[i]= i+1;
for (int i=q-10; i<q; i++)
cout << "P " << i << " = " << p[i] << endl;
}
delete [] p;
cout << "Hello C++" << endl; //Breakpoint 2
cin >> c;
return 0;
}
When i press F8 (Start debugger) the debug windows show following
Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Debug
Adding source dir: G:\Jo\documents\TestDebug\
Adding source dir: G:\Jo\documents\TestDebug\
Adding file: bin\Debug\TestDebug.exe
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb 6.7.50.20071127
Function "G:/Jo/Programmeren I (Van Laethem)" not defined.
Breakpoint 1 ("G:/Jo/Programmeren I (Van Laethem)/documents/CurusTest/TestDebug/main.cpp:28) pending.
Function "G:/Jo/Programmeren I (Van Laethem)" not defined.
Breakpoint 2 ("G:/Jo/Programmeren I (Van Laethem)/documents/CurusTest/TestDebug/main.cpp:12) pending.
Child process PID: 3864
Error while reading shared library symbols:
Error while reading shared library symbols:
Program exited normally.
Error while reading shared library symbols:
Error while reading shared library symbols:
Error while reading shared library symbols:
Error while reading shared library symbols:
Error while reading shared library symbols:
Error while reading shared library symbols:
Debugger finished with status 0
The program run without stop on the breakpoints .
What i do wrong, cane somebody help me.
Best Regards, Vic