简体   繁体   English

使用cmake为Eclipse CDT生成的项目

[英]Project generated with cmake for Eclipse CDT

I followed How to configure a C/C++ project with Eclipse and CMake article to import my project which was generated with cmake to Eclipse CDT. 我按照如何使用Eclipse配置C / C ++项目和CMake文章将我用cmake生成的项目导入Eclipse CDT。 All went fine except when debugging. 除了调试时,一切都很顺利。

I get this error when trying to debug 尝试调试时出现此错误

No source available for "main() at 0x5bca71"

And in gdb console window, here's the message 在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".

I'm using Eclipse Kepler and cmake version 2.8.10.1 in Linux Mint 15 我在Linux Mint 15中使用Eclipse Kepler和cmake版本2.8.10.1

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

After a whole day of struggling, I switch to Kdevelop4. 经过一整天的挣扎,我转而使用Kdevelop4。 Importing a cmake project is just as simple as opening the CMakeList.txt file and Kdevelop will do the rest for you. 导入cmake项目就像打开CMakeList.txt文件一样简单,Kdevelop将为您完成剩下的工作。 It is so fast, especially its code completion. 它是如此之快,特别是它的代码完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM