c++ - 使用 cmake 为 Eclipse CDT 生成的项目

标签 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

最佳答案

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

关于c++ - 使用 cmake 为 Eclipse CDT 生成的项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18931278/

相关文章:

c++ - CMake 无法使用相对文件路径找到静态库

c - 如何解决Eclipse CDT中的 "Undefined reference to function"?

c++ - c++ linux 中的静态链接使用: do I need to recompile everything each time I change library?

c++ - 如何确定一个类是否包含子类/类型?

c++ - 我如何让连续内存以安全的方式表现出多态性?

c++ - 关闭文件时会出现错误吗?

ios - 从 CMake 设置 iOS "Launch Screen File"

c++ - 如何将二维数组初始化为类变量?

c++ - CMake 和 Clang 工具链接错误(树外)

c++ - 使用 vector Android NDK - Eclipse CDT