I am trying to port a fairly large C++ project to using g++ 4.0 on Mac OS X. My project compiles without errors, but I can\'t get GDB to work properly. When I look at the stack
I have a new thing you can try.
Just before your own main
you can write
#ifdef main
# error main is defined
#endif
int main(int argc, char *argv[]) {
this should give an error if you have some header that redefines main
.
If you define an own you might get an warning where a previous definition was made
#define main foo
int main(int argc, char *argv[]) {
You can also try to undef
just before your main
#undef main
int main(int argc, char *argv[]) {