使用cmake为Eclipse CDT生成的项目

时间:2013-09-21 09:57:44

标签: c++ cmake eclipse-cdt

我按照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

2 个答案:

答案 0 :(得分:1)

尝试将CMAKE_BUILD_TYPE设置为Debug并重新生成/重建项目。

答案 1 :(得分:1)

经过一整天的挣扎,我转而使用Kdevelop4。导入cmake项目就像打开CMakeList.txt文件一样简单,Kdevelop将为您完成剩下的工作。它是如此之快,特别是它的代码完成。