“No source available for main()” error when debugging simple C++ in Eclipse with gdb

后端 未结 13 1363
醉梦人生
醉梦人生 2020-12-29 04:51

I\'m having trouble debugging a C++ program in Eclipse (the latest RC of Helios, updated with latest CDT from within itself) on OSX.

The program is very simple (esen

相关标签:
13条回答
  • 2020-12-29 05:43

    I had a similar problem. I was using CFLAGS=-Wall -O2 -fPIC -DPIC -lm -lasound and never had problem to compile it but when I tried to debbug it on Eclipse IDE I get this error: No source available for "main() at 0x401080" then I added -g to this line and it worked well:

    CFLAGS=-g -Wall -O2 -fPIC -DPIC -lm -lasound

    0 讨论(0)
提交回复
热议问题