我关注了How to configure a C/C++ project with Eclipse and CMake文章将我用 cmake 生成的项目导入 Eclipse CDT。除调试外,一切正常。
我在尝试调试时遇到此错误
No source available for "main() at 0x5bca71"
在 gdb 控制台窗口中,消息如下
The target endianness is set automatically (currently little endian)
No source file named /home/.../Desktop/GP/Test/src/Main.cpp.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
我在 Linux Mint 15 中使用 Eclipse Kepler 和 cmake 版本 2.8.10.1
最佳答案
尝试将 CMAKE_BUILD_TYPE
设置为 Debug
并重新生成/重建项目。
关于c++ - 使用 cmake 为 Eclipse CDT 生成的项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18931278/