5
votes

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. 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

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

2
This question may help you stackoverflow.com/questions/2324602/…user35443
I already visited that question, and all others I found the whole day but it didn't fixed my problemtambalolo

2 Answers

1
votes

Try setting CMAKE_BUILD_TYPE to Debug and regenerating/rebuilding project.

1
votes

After a whole day of struggling, I switch to Kdevelop4. Importing a cmake project is just as simple as opening the CMakeList.txt file and Kdevelop will do the rest for you. It is so fast, especially its code completion.