Eclipse Oxygen C++ Hello World Cross GCC error - c++

so I've been wanting to learn C++ and I just got a new computer. I downloaded Eclipse Oxygen, had some trouble getting it running, but it all works fine now. I tried to write a hello world right off the bat, and there was a gcc and g++ error. I looked it up and got MinGW GCC and it shows up in C++ Project tool paths, but if I hit the 'Hello World' project the box where the different toolpaths show up is completely white and when I continue to the project there is the same gcc error as before. I know this wouldn't happen if I chose MinGW GCC, but I don't have that option when I pick the 'Hello World' project. ANy help would be greatly appreciated.

Check whether you have added MINGW To the Path Environment Variable
When your creating a eclipse project - disable the show project types and toolchains only if they are supported on the platform.

Related

First time using SFML-2.5.1 in NetBeans IDE 8.2 I ran into the problem

After the setup I've done in the properties of the project: at C++Compiler and Linker in both Release and Debug configurations I tried to build the project, which went successful.
Then I decided to run it and had some difficulties: using External Terminal, that did absolutely nothing, Standard output, that showed some text related to dll files I've clue about, Internal Terminal, that showed the very same text.
After that didn't work I went for cmd execution and what I saw was this.
Could you explain what that means and what I'm supposed to do. I'm new to all that kind of stuff, so I apologise if I did something stupid.
Cheers
EDIT: If not seen, I'm using Windows 10 and the version of SFML is GCC 7.3.0 MinGW (DW2) - 32-bit

Trying to use Eclipse for c++ project on Mac

I am a total noob at programming and IDEs. I am attempting to open a project for some research that I am doing. I have a Macbook Pro using Mac OS High Sierra 10.13.6.
The project that I'm trying to open is a c++ project, but every time I open it, there are error messages everywhere. It appears that the header files aren't even being recognized. A screenshot is linked below. From what I've read so far, the issue seems to be that I don't have a proper debugger for c++. I downloaded XCode after I downloaded Eclipse like some guides have recommended, but it still hasn't fixed the issue.
Other sources I've found on this site use highly technical language (Eclipse GDB MacOSX Mavericks), so I'm struggling to figure out how to fix the problem. If anyone has any ideas, I'd love to hear them.
Here is a better solution for beginners.
Create a file called HelloWorld.cpp
and copy paste the following inside:
#include <stdio.h>
int main(int argc, char **argv)
{
printf("Hello world\n");
return 0;
}
Then open your terminal ( like that ) and write this:
$ g++ -g -o main HelloWorld.cpp
If this goes smooth it means you have gcc installed (good!).
After that try to run this:
$ gdb ./main
If this goes smooth it means you have gdb installed (great!).
Move to create a new Eclipse project with this file only
and update your post if there are any problems.
If this goes smooth gradually migrate your stuff to HelloWorld.cpp.
If gcc or gdb steps above fail, you have to install them first.
There are many online guides on how to do that. Good luck!
I am by no means a Mac expert or do I know much about eclipse CDT or Xcode but I can offer what I know. This is not a complete answer but I just want to share as I also know what it is like to struggle with C code on OSX.
First,
You need to make sure the C/C++ compilers are installed on the Mac properly. They come with XCode and I believe the compiler is Clang. Then you need to make sure the standard libs were installed correctly.
That whole issue is your first problem and should be asked to an XCode programmer and what not.
Second, to use eclipse CDT you need to tell it where and what compiler you are using. As well as the linked and debugger. You can do this in the project properties or settings. The stuff should usually be put in the path variable but once eclipse CDR knows where to find all that and everything is installed correctly it should pick up the header files and then include them in every project!
That’s all I can really provide you and I hope you can find out more.

Building c++ program using eclipse neon gives me "cc1plus.exe" has stopped working error

I am just trying to run a basic hello world c++ program that was recommended by eclipse (file->new->c++ project-> "Hello World C++ Project" and am reaching errors at every level. At first the build would give me a "make file" and "g++" not found but then I installed minGW/gcc/minSYS using the "mingw-get" installer provided at this address http://www.mingw.org/wiki/Getting_Started on my computer, fixing that issue. But now when I try and build this or any other c++ program I get a pop-up saying "cc1plus.exe has stopped working" whether I build the entire workspace or just the program. Can anyone explain what might be going wrong? I've reinstalled both eclipse and minGW by deleting their folders and starting again but nothing seems to be working!
Using
Windows 8(64 bit)
Eclipse Neon 4.6.1

Getting Started with Eclipse CDT

I have downloaded the latest Eclipse CDT release (Helios) and wanted to try my luck with some C++ programming (haven't done that in ages).
I tried to do the "Hello World" project, but I got stuck quite fast.
First thing - the #include <stdio.h> and #include <stdlib.h> got marked with an 'Unresolved Symbol' warning. So I found the place where I can add include paths and pointed it to these headers from the Visual Studio installation I have.
After that, it looked fine but:
I don't see compilation errors/warnings in the Problems tab.
I cannot run the code - I get 'Launch failed. Binary not found' error
My question is simple - what are the steps I really need to do to get my code compiled, linked and executed?
I tried looking for it on Eclipse's site, but didn't find any reference to that.
I'm making a guess here, that your are running on Windows, because that particular error seems to be a windows related one.
You seem to be missing the basic toolchain needed by the CDT to actually build the project. You need some files Before You Get Started. I suggest the mingw installer, as it is simple, and lets you actually build Windows compatible binaries.
Check out the link above, and then make sure your project links to the toolchain. Hope that helps.
A starting point could be:
File -> New -> c++ project
Type a name for the project, select Hello World c++ Project under Project Type and click Finish.
Right click on the project -> Run As -> Local C++ application (or just click the Run button on the toolbar).
I was getting the same error until I ran the "Build All" command. That command created two new folders, Debug and Release. Then when I clicked the "Debug" button, it asked me which one I wanted to run and I selected "Debug" and it ran perfectly.
It seems like the binary it couldn't find was created from the "Build All" command.

Link error using Cygwin toolchain

I need to use Cygwin to compile C++ code for an Android project. I'm having trouble compiling even a basic "hello world" program. The console gives me this message:
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: unrecognized -a option `ware'
I've googled the error and the only result I've found was an issue with one of the programs (I think it was binutils) being out of date, and was resolved when that program was updated. I downloaded the entirety of the Cygwin package at once, so I don't think that's the problem. The compiler and linker aren't communicating properly. How do I fix it without changing compilers?
I figured it out - Android doesn't support the standard C++ library. Fixed by downloading http://www.crystax.net/android/ndk-r4.php
Which basically reimplements that for Android.