Cygwin and Eclipse Helios setup - c++

I am trying to learn C++ with Cygwin and Eclipse Helios.
I got all the development tools under Cygwin installed; and installed the CDT package for Helios.
The problem is I don't see an option to create a C++ project from makefile or any other option. I can only see options for a C Project, C++ project and a new project from existing source code.
Here is what I referred to:
Eclipse seminar
Developing applications using the Eclipse C/C++ Development Toolkit
Questions:
Is there any clear guide to setup Eclipse for Cygwin?
Am I missing something in the setup?
any other suggestion will be helpful.

Are you asking how to setup GCC in cygwin + Eclipse? How about this tutorial?

I found this tutorial to be a very good source. It was almostperfect, apart that one more path needed to be add to the folder containing cygstdc++-6.dll which prevented anything to be printed on console. So, add to the Project Properties -> C/C++ General -> Paths and Symbols -> Includes GNU C++ the path to the missing dll folder: ${CYGWIN_HOME}/usr/i686-pc-cygwin/sys-root/usr/bin.

Related

How can I change build tools for projects in VS Code?

I want to build a C++ code but it errors. When I check the error message it's related with .NET. I have C# extensions but this isn't C# and I want to change this to g++ for C++ projects. I have g++ installed and added to path however I don't know how can I configure it to build with that for C++ codes.
Edit: I marked the answer as a solution but I also found an easier way for me:
https://code.visualstudio.com/docs/cpp/config-msvc
cl.exe basically.
One option (probably not the one you want to) is to build it from integrated terminal.
You can download c/c++ extension along with the cmake tools extension to have buttons for build/run configuration.

View the source code C++ in Eclipse - Ubuntu environtment

I had loaded the project to Eclipse but when I open the .cpp file, it like to open a text file.
Anyone know how to display the code-view in eclipse?
Please support.
Thank you so much.
I cannot find C/C++ in Window -> Preferences
Then you have no CDT installed – I suppose you got the version direct from the initial download page, but that's actually the java package – there's a link 'download packages' below, where you would have found the C++ package. Not too obvious, admitted.
Never mind, you don't need to re-install: Help -> About will reveil you your installed version's name ('Kepler', 'Luna', ...); via Help -> Install new packages you can add CDT plugin to your installation. Select under work with your release version of eclipse repository, e. g. http://download.eclipse.org/releases/photon.
Minimally, you need: C/C++ Development Tools, other plugins might be useful, too, like standalone debugger, call graph visualisation, unit testing support, auto tools support (configure, make; especially under linux), possibly LLVM support (if you want to use clang compiler), ...
My issue had been fixed.
Just do below steps in ubuntu:
Go to
https://www.eclipse.org/cdt/downloads.php and download newest CDT(C/C++ Develop Tool) version.
Copy the download file
eclipse-cpp-2018-12-R-linux-gtk-x86_64.tar.gz
to your folder in Ubuntu.
Extract
eclipse-cpp-2018-12-R-linux-gtk-x86_64.tar.gz
Run execute eclipse file -> Done.

How do I set up C/C++ on Eclipse in Windows?

I just did the default Java (8) installation of Eclipse on my Windows (8, yikes) laptop, and it seems to work just fine. However, I'm not as good at Java as I am with C and C++, and for some work it's more expeditious to use C/C++ than Java.
Unfortunately, the Eclipse installer for Windows doesn't make it very easy to set up Eclipse for C/C++. It looks like I'd be fine with Linux or BSD, but then I'd have to scrounge up another laptop (because I need the mobility) and install Linux or BSD on it. Yes, I need to leave Windows on this machine, so Windows hate isn't going to help me.
My lazy web search turned up this article: "Install Eclipse for C++ Development on Windows 7 64-bit". Is there a better installation guide than that, or does anyone care to describe the process in more detail?
Even though you have CDT features installed, you need to install a GCC compiler for windows such as MinGW or Cygwin. Once you install them, add the 'bin' folder in the installed path to the environment variables and then restart eclipse. You should now see MinGW compiler when you select "Create new C Project". After this step, proceed with your C programs and this should resolve your problems.
You will have to install a GCC compiler in your PC and then link it to the project each time you create a project. This can be done while you create a new project, or even after you have done so. You can download MinGW compiler through the following link
https://sourceforge.net/projects/mingw/files/latest/download?source=files
Once you have downloaded the compiler and installed it, it can be linked through the following steps:
i. While creating a new project, choose MinGW GCC compiler in the tool chains.
ii. Once you have finished creating a project, go to Project->Properties.
iii. Look for Run/Debug Settings in the left panel.
iv. Click on the New tab and select C/C++ Application.
v. Look for Environment option.
vi. Click on the New tab.
vii. Type "PATH" in the Name bar and fill the Value bar with the path of the compiler. For me, its C:\MinGW\bin.
vii. Click on OK and you are done!
The instructions you link to have you install Eclipse IDE for C/C++ developers which will work fine to get a C/C++ development environment up.
If you would instead like to use your EXISTING installation of Eclipse and add C++ Development Tooling (CDT) you can launch Eclipse and then use Install New Software to install the C/C++ Development Tools

Eclipse doesn't show any C++ project selection after I install CDT

I have had a problem, I installed CDT in eclipse, the installation was successful. However, when I tried a project in C++, there is no selection for C++ Project in Menu File -> New. I have tried to find it everywhere but It doesn't show up. I also reinstalled it several times, It still didn't work.
My Eclipse is JUNO
here is the link I add to "Install new software" in help : http://download.eclipse.org/tools/cdt/releases/juno
Go to File -> New -> Other and find C/C++ projects. Unless you have the C/C++ Perspective view on I don't think C++ projects are offered at the first level under new. Once you actually, start a C++ project, Eclipse will ask if you want to switch to the CDT persepective.

What plugins do you use along with Eclipse CDT?

Suggest some plugins you find useful in your day by day work.
Eclipse CDT repositories:
Helios: http://download.eclipse.org/releases/helios
C++ Development Tools: http://download.eclipse.org/tools/cdt/releases/helios
Plugins:
Subclipse: http://subclipse.tigris.org/update_1.6.x
Eclipse Linux Tools: http://download.eclipse.org/technology/linuxtools/update
CMakeBuilder: http://www.cmakebuilder.com/update
CMake Editor: http://cmakeed.sourceforge.net/updates
Qt Eclipse Integration: Installation instructions link
Eclipse CORBA Plugin: http://eclipsecorba.sourceforge.net/update
Please add one plugin with its eclipse update url for posting.
I am using
Qt plugin for Eclipse
CMakeEdit for colorful CMakeLists.txt ;-)
Subversion (tried subversive, didn't work for me)
tried the linuxtools plugins (very ambitious project) for valgrind etc., but they are not
really working ATM
I use a self-made plugin to do automated builds of CDT projects.
THis plugin is automatically creating a workspace from a description file that contains the project names, disables the indexer and auto-build, sets the wanted build configuration in all projects and then builds the temporary workspace.
I use viplugin to get vim keybindings in Eclipse.
EGit - it's definitely helpful although I still do a fair amount of gitty stuff on the command line (and EGit stays in sync with changes I make on the command line, of course).