Hi - I just installed C::B under OpenSuse having already used the Windows version for a couple of days. OpenSuse is what I'll mostly be using and I've set GCC as the default compiler. I wrote a trivial "Hello World" type app in C, like so:-
#include <stdio.h>
int main()
{
printf( "Hello World" );
return 0;
}
I compiled a Debug build and placed a break point at the printf() line and pressed F8 (which, I'm assuming, is supposed to run the program in the debugger). However, it didn't stop at the break point. What am I doing wrong?
Thanks TDragon - in that case, -g is selected for my Debug build and -s is selected for my Release build (with no other options selected). Does this make it any clearer why the break points don't seem to be working? Or could it maybe be a problem with optimizations?
[Edit...] Ah - a breakthrough! If I change the code to this:-
#include <stdio.h>
int main()
{
printf("Hello World");
printf("Hello Earth");
printf("Hello Venus");
return (0);
}
I can place a break point on any line after the first printf() line and it will work!! The only problem is that I can't continue execution by using CTRL+F7. Strangely though, if I select Debug->Continue (which is theoretically the same thing) that does work ?!? It's a step forward but I'm still baffled.
Oh, and I still lose the breakpoints if I save and reload the project (or workspace).