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

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

    Thought to mention, that in case you are using cmake to build the project, one approach to the solution will be to add the "debug flag" to the cmake command, i.e. -

    $ cmake /path/to/main/cmake_file -DCMAKE_BUILD_TYPE=Debug

提交回复
热议问题