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

后端 未结 13 1360
醉梦人生
醉梦人生 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:20

    Encountered the same problem once. You just have to go to your Project Properties, by hitting ALT+ENTR or right click project and scroll down at the bottom and you will find Properties. Expand C/C++ build on the left. Then click on settings. Once you open the settings, then click on tool settings. In the MCU GCC Compiler, there is a debugging option. Click on debugging and add

    -g -O0
    

    in the Other debugging flags. Trying debugging the project now.

提交回复
热议问题