Jump to content
  • Advertisement
Sign in to follow this  
Endurion

Eclipse CDT Failure

This topic is 1053 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This is not game related, but nevertheless I hope for help. At work I can only use Eclipse Kepler for a specific platform with C/C++. There's a CDT plugin which parses the code on the fly, but it utterly fails on perfectly fine code. In particular on conversion operators/constructors, which I'm heavily using for logging.

This actually seems like a known problem, but is ridiculously annoying since half the code is marked red.
It is really useful when it works, but the positive is overwhelmed.

Anybody found a remedy for this?

Share this post


Link to post
Share on other sites
Advertisement

Sadly, that does not surprise me from the Eclipse project. Last time I tried to use CDT was in 2013 or 2014 and it still did not recognize half the C++11 syntax, like nullptr, deleted/defaulted methods, constexpr, variadic templates, etc. and it underlined everything in red, which annoyed me to no end. And when it worked it was slow as hell. Sadly, you'll probably have to fix it on your own if you want it to work... which is probably not an option if you just want to get some work done.

 

Personally, when I'm on Linux (or pretty much anything that does not have Visual Studio, I should say...), I'd rather write code with a plain text editor and compile/debug with my good old friend the Linux terminal instead of wasting my time trying to make Eclipse do anything useful. Gedit may not understand C++ code either, but unlike Eclipse it does not pretend to! It also doesn't take my poor RAM for an all-you-can-eat buffet, which is always nice. tongue.png

 

Even if you prefer an IDE, I wonder what platform would doom you to only use Eclipse. 0Qt Creator is available for Windows, Linux and OS X, it is free, and it runs circles around Eclipse. (Heck there's even a few points where it can be better than Visual Studio.) Although it's commercial (paid for) there's also a new IDE called CLion which is pretty good, although it uses CMake instead of having its own project/solution files so your project needs to use that.

Edited by Bearhugger

Share this post


Link to post
Share on other sites

I'm using Eclipse for Tandem/NSK development. The official development environment from HP is a plugin for Eclipse. I despise Eclipse as every other sane developer.

 

They made the recent debugger part of the plugin too, the other way is an older clumsy tool with windows flying all over. Therefore I'm rather set on Eclipse. Looks like I need to turn off the marker part; I hope that doesn't also turn off the intellisense thingy as well.

Share this post


Link to post
Share on other sites
Eclipse Kepler requires some setup to work with C++11 features.

http://stackoverflow.com/questions/9131763/eclipse-cdt-c11-c0x-support

Here are the needed steps. The -std=c++0x option should be added to the command line, which Eclipse uses to get compiler options.

After that, I have no problems with code, marked in red. If I have such issue (happens mostly after moving parts of code between files), rebuilding of the index fixes it.

Share this post


Link to post
Share on other sites

Thanks, I'll try that. I do not use any C++11 features (as in the compiler doesn't support it), but some of those hints on SO look interesting.

 

Most failures come from conversion operators. Can't tell you if it works before monday though.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!