How to install CDT to Eclipse Luna - c

I am trying to install the C/C++ development tools for Eclipse Luna.
Taking reference from this page here, I navigated to Help> Install New Software> and placed http://download.eclipse.org/tools/cdt/releases/8.4
in the "Works with" section.
I got the options for C/C++ Development Tools and C/C++ Development Tools SDK which I downloaded and restarted Eclipse. However, on restarting eclipse I cannot find any place/interface to create C programs or files. The tools are showing up in the installed softwares list(screen attached).
I have also installed MinGw as instructed here.
Have I missed any step? How can I start C development in Luna. Please advice.

I had the same issue with Luna. I installed Java 1.7.0_80, which then allowed me to change to the C/C++ Perspective and create new C/C++ projects.
My system previously only had Java 1.6.0_45, which was sufficient to run Luna but apparently insufficient to run CDT in its entirety.

Your JDK version is below 1.6 which is too old. You should upgrade it to 1.7 or higher.

I had the same problem - installing java 8 helped.

I had exactly the same problem, using Luna SR 1a on Ubuntu 12.04 LTS.
Switching from Java 1.6.0_34 to 1.7.0_75 fixed the issue - everything works now

Related

I have installed MinGW and codelite and everything works except showing "locals" when stoping at a breakpoint when debugging

I have installed recently on my windows 10 the MinGW for using it on C development plus codelite.
Everything works, I can compile and run programs, but I can't find the way to make the debugger show me the value of locals. I am newbie on software development world and I have no idea what can be missing.
I downloaded mingw, installed it for c and c++ languages, added the paths on the environment variables config and then installed codelite, where I could scan the MinGW compiler.
If anyone can guide, I would by highly grateful.
Best regards,

Which MinGW packages should I install?

I'm just starting to dip my toes on coding, starting with C. I asked people how to set an environment for C coding, they said VScode for editing and MinGW for compiling is the best.
I got VScode with C/C++ extension installed, but I have trouble installing MinGW. I've installed MinGW Installation Manager, and there are hundreds of packages available to download. Which of them should I install?
See the MinGW documentation about what packages are recommended. Also, the free VisualStudio Community Edition might be better suited for beginners than MinGW, as it is an all-in-one-package.

C/C++ Run/Debug configuration in Eclipse

I am new to C/C++ development in Eclipse and trying to configure Eclipse. I'm working in a Linux environment with GNU GCC and my toolchain is detected by Eclipse. As given in the Eclipse documentation 1, I opened Run>>Run configurations. But the C/C++ Local tab is not there.
This is all I get.
But when I build a sample helloworld program, it's being built correctly.
Any idea why this happens?
1 http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Ftasks%2Fcdt_t_run_com.htm
I faced same issue as you. I was able to create and build one c/c++ project, but I couldn't run/debug it. Actually, I installed wrong CDT (CDT Visual C++ Support). Next I installed correct CDT (c/c++ development tools) and after one eclipse restart I had c/c++ application inside of Run Configuration.

Eclipse: Cannot install CDT because of a conflicting dependency

my eclipse has been configured for Java and pydev, now i want to configure C/C++ development tools with Eclipse. i dont want to download the whole Eclipse IDE for C/C++ Developers, for it is not convenient. so i decided to install CDT in my Eclipse.
Help ==> Install New Software, then input http://download.eclipse.org/tools/cdt/releases/indigo, waited for a while, and chose the following CDT Main Features, CDT Optional Features, and Next, then an error occurred.
Cannot complete the install because of a conflicting dependency.
Software being installed: C/C++ DSF GDB Debugger Integration 4.0.0.201106081058 (org.eclipse.cdt.gnu.dsf.feature.group 4.0.0.201106081058)
Software being installed: C/C++ Development Tools SDK 8.0.2.201202111925 (org.eclipse.cdt.sdk.feature.group 8.0.2.201202111925)
Only one of the following can be installed at once:
GDB DSF Debugger Integration Core 4.0.0.201106081058 (org.eclipse.cdt.dsf.gdb 4.0.0.201106081058)
GDB DSF Debugger Integration Core 4.0.2.201202111925 (org.eclipse.cdt.dsf.gdb 4.0.2.201202111925)
GDB DSF Debugger Integration Core 4.0.1.201109151620 (org.eclipse.cdt.dsf.gdb 4.0.1.201109151620)
Cannot satisfy dependency:
From: C/C++ Development Tools 8.0.2.201202111925 (org.eclipse.cdt.feature.group 8.0.2.201202111925)
To: org.eclipse.cdt.gnu.dsf.feature.group [4.0.1.201202111925]
Cannot satisfy dependency:
From: C/C++ DSF GDB Debugger Integration 4.0.0.201106081058 (org.eclipse.cdt.gnu.dsf.feature.group 4.0.0.201106081058)
To: org.eclipse.cdt.dsf.gdb [4.0.0.201106081058]
Cannot satisfy dependency:
From: C/C++ DSF GDB Debugger Integration 4.0.1.201202111925 (org.eclipse.cdt.gnu.dsf.feature.group 4.0.1.201202111925)
To: org.eclipse.cdt.dsf.gdb [4.0.2.201202111925]
Cannot satisfy dependency:
From: C/C++ Development Tools SDK 8.0.2.201202111925 (org.eclipse.cdt.sdk.feature.group 8.0.2.201202111925)
To: org.eclipse.cdt.feature.group [8.0.2.201202111925]
i have googled for a lot of time, but still cannot find a valid solution. can anyone give a hand to me? thanks a lot!
I faced with this problem, too. I just download the c/c++ mode of eclipse which already includes CDT. It works. If you couldn't fix it, you can try this way. It is better than nothing.
Normally if I see this many errors, it's because I have picked the wrong update site... maybe a silly question, but do you actually have the Eclipse Indigo base version installed? You can check with Help->About Eclipse, second line down.
That answer referring to Help->About was a HUGE help. Once there I clicked on the Installation Details button, checked everything CDT/C++ related and clicked Uninstall. Once Eclipse restarted, I was able to install CDT without any problems whatsoever.
TH
this looks very similar to a problem I had. In my case it was that some of the packages in the Optional Extras are already implicitly included in the CDT (such as the GDB DSF packages) and so there are conflicts when you try to install both packages.
If you highlight each package you want in the optional extras it will say in the short comment line describing the package weather or not a version of that package is included by default in the CDT, if it is deselect. Hope this is helpful.
This may be a little late, but try installing the base CDT package by itself first. Restart Eclipse and then install the CDT Optional Features, this time ticking the "Hide items that are already installed" checkbox. This solved the issue for me.
I had a similar dilemma as you did. In my case, I downloaded CDT Main Features first and had all the boxes checked in the window. Especially the box that said, "Contact all update sites during install to find required software." Afterwards, I installed "CDT Optional Features" with all the boxes checked as well.
I'm running Kepler Service Release 1 on Windows 8.1, 64-bit.
I encountered this exact behaviour when I tried installing CDT by using these options:
Do not select both C/C++ Development Tools and C/C++ Development Tools SDK. This will result in the CDT help files being available, but the C/C++ perspective and C/C++ project type being unavailable, due to probably a package collision (although strangely, nothing was showing up in my workspace .log file).
The correct configuration is to select just the C/C++ Development Tools, unless of course you want to contribute to CDT, in which case you'd select the C/C++ Development Tools SDK. Most users will be content with just the development tools. The following selection worked for me.
Now i use ubuntu, and using the command sudo apt-get install eclipse-cdt directly solves the problem. It's a little strange that why there is a conflict when installs CDT using eclipse'sInstall New Software.

How does one configure Eclipse to compile using -std=c99?

The question is in the title. Using GCC version 3.4.5 on Windows Vista and a recent version of the Eclipse C/C++ IDE (not sure what version exactly because it's hard to figure out which version is the one for the whole IDE, but I downloaded it two weeks ago so it can't be that old).
This depends on the build system you use, but you can always try adding the "CFLAGS=-std=c99" as a build and/or environment variable the the builder.

Resources