Really difficult error arose in eclipse for C++ - c++

I just downloaded eclipse c/c++ IDE developer and made a C++ project. but then under problems tab, this comes up and I cannot proceed to do anything else from there.
sh-c "autoreconf-i"
Alright, I downloaded the MinGW. While installing, I clicked download original repository catalogues, accepted the agreement, and when it asked me to choose which optional components of MinGW to install, I clicked c++ compiler, at the bottom though there are like msys basic system and mingw developer toolkit, which I did not click. After I installed it, I went to computer properties then environment variables and then added ;C:\MinGW\bin to Path. I then searched for cmd and typed in gcc. It outputted, "gcc : fatal error : no input files" and below that is "compilation terminated." . I clicked eclipse and clicked C++ project. But still there was no MinGW GCC under Toolchains. All I saw was GNU autotools Toolchain.

Related

Eclipse Can't Find MinGW/Can't setup C++ on Eclipse

I am trying to setup c++ in Eclipse IDE. I have installed the C++ Development Tools and C++ Development Tools SDK. I have read "Before you begin" in "C/C++ Development Guide". I have installed MinGW on the page it provides. It installes it to C:\MinGW which Eclipse said it could recognize. I create a new makefile C++ project with MinGW selected as my tool chain. I had to uncheck "Show toolchains only if they are supported on the platform". It doesn't work. I have spent hours on trying to make this work.
You need to tell Eclipse where to gcc.exe and g++.exe.
In your case I would expect that to be C:\MinGw\mingw32\bin or C:\MinGw\bin.
If there's no gcc.exe and g++.exe there, it would appear your MinGW setup is broken.
Note that plain MinGW is a not very well maintained or up to date. I would recommend switching to MinGW-w64, which exists for both Windows 32-bit and 64-bit. A standalone build for Windows of recent MinGW-w64 can be downloaded from https://winlibs.com/. Just extract the file (no installer needed) and point to the mingw32\bin or mingw64\bin folder to find the compiler toolchain.

What is different of wxWidgets between when install by MSYS and compile by MinGW?

I am learning GUI programing on Windows, and I choose wxWidgets, Eclipse, MinGW for my learning. I can compile wxWidgets with command:
mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=release UNICODE=1
And I found that I can install it by MSYS by command
cd /mingw/wxWidgets-2.8.10
./configure –prefix=/mingw –disable-shared
make && make install
What must I do to integrate wxWidgets with Eclipse? Do I compile it by MinGW or install it by MSYS and How can I set up it for Eclipse Neon?
`
From your standpoint there is no difference.
It is better to compile the library with MinGW and do a DEBUG build since you will do development and a lot of times this will help a lot.
Now in order to set it up with Eclipse:
After you build is finished, open up Eclipse.
Create a project (C++) or open an existing one.
Open the dialog for project properties and find where it asks you to set the "include/header search path".
Set this to be "/include;/lib/debug/include". The second path is a path to the build_directory/include where setup.h is located.
In the same dialog for project properties find where it asks for a library search path.
There enter "main_wx_folder/lib".
Somewhere in that same page of this dialog find where it referencing the actual libraries. Add "-lwx_base... -lwx_core...". Check the actual file names inside the lib/ folder. Should be something like libwx_*.
Compile the project.
Keep in mind though that Eclipse is not "officially supported" IDE, meaning that there is no project for that IDE supplied with the library and there is not too many people use it for C++ development with wx.
The "official supported IDE" for wx are: MSVC, CodeBlocks and (to some extent) CodeLite.
It use to support Borland compiler (and IDE), but unfortunately there was a recent posts on the forum that recent version of Embarcadero broke the build of the library. This compiler is still supported though.
Good luck! If you have any issues don't hesitate to update the question with any possible errors.

Qt Creator Compiling Error at step 'make'

I just started using Qt Creator for creating C++ GUI programs. I just downloaded it and installed it, but the compiling process is throwing me errors. When I try to compile my project (very simple, just a QLabel on the screen...it's my first project) it comes up with the error:
qtcreator_ctrlc_stub: Command line failed:
C:\Users\andrew\Dropbox\Programming\C++\build-
FirstGUIApp-Desktop_Qt_5_1_1_MSVC2012_32bit-Debug\Makefile 10:04:35:
The process
"C:\Users\andrew\Dropbox\Programming\C++\build-FirstGUIApp-Desktop_Qt_5_1_1_MSVC2012_32bit-Debug\Makefile"
exited with code -1. Error while building/deploying project
FirstGUIApp (kit: Desktop Qt 5.1.1 MSVC2012 32bit) When executing step
'Make'
I hunted around for an answer here and here and a couple other places but I'm just confused about the whole thing. I have a couple of ideas of my own but I don't know how to try my ideas. Here are some of my ideas:
1) MinGW isn't in the path or isn't installed
But, if it isn't in the path, how do I put it in? Where is it? I have Code Blocks installed which has MinGW installed, so could I maybe use it from there?
2) the make file is messed up somehow
Again, what could be wrong and how could I fix it?
3) Qt Creator isn't installed correctly.
Obviously, re-install it, but I want to make sure all other options are tried before, because it took me a very long time to download.
I apologize if I'm sounding noobish or it's a stupid question, but I really am confused with all of this. Please be patient with me and try to explain things well and thoroughly. I'm using Windows 8.1 and downloaded the offline installer. Thanks in advance.
UPDATE
Here is a screenshot of my Qt, how can I tell if it is the visual studio or minGW version?
UPDATE
Here is my MinGW Folder in CodeBlocks. Is this the folder with the compiler or is it something else?
For your ideas:
1: if you downloaded from qtproject with binary. then qt and qt creator should be installed under the C:\Qt\Qt5.1.1 then corresponding minGW should be stay in C:\Qt\Qt5.1.1\Tools\mingw48_32\bin\gcc.exe
this is the directory you need. Remember, QtCreator needs two tools to make sure your project and compile and run, qmake and compiler.
Qmake is tool help you translate .pro file into makefile,
compiler (gcc) minGW use gcc to run the makefile, compile your code to binary.
where to figure out tools you are using are correct?
---> qtcreator --> Tools -> Build&Run -> Kits
in here You should be able find different kits, of course you maybe have only one.
Select one, Double check the Qt Version and Compiler is the one you wish to use.
click Manage next to compiler, Every compiler in the Auto-detect should be ok to use.
If you don't see anyone, add one, click Add, MinGW, put C:\Qt\Qt5.1.1\Tools\mingw48_32\bin\gcc.exe like into path. ABI should auto-set depends on your environment.
Answer to your second question, what's wrong with your makefile, no one knows, you should check your .pro, usually makefile are generated by qmake xx.pro. Double check your .pro file and re-run qmake will solve the problem.
in tools->options->build&run check if minGW is actually there in the compiler and kit list
in the project tab (on the left hand side) you can set the environment for the build click the PATH value and add the path to minGW to it (you may need to add a lib and include var so the standard library gets added)
re run qmake from the build menu
double check you have the correct version it looks like you have the visual studio Qt not the minGW version,
Terminal:(in Linux)
sudo apt-get install build-essential cmake libqt4-dev
i'm sorry i dont know why this code works,but i have the same problem in linux and this code worked.

Getting eclipse c++ set up on linux?

I downloaded the c++ version of eclipse from the eclipse website. This installed then when i ran the basic hello world code, it wouldn't compile.
What else do i need to install to get c++ compiling on eclipse? I thought linux already had what it needed for c++ building/running? Ive googled around but the advice is for older versions of eclipse and the screen captures show options not available anymore.
I'm on Ubuntu 64
Eclipse CDT needs a makefile to build.
You need:
GCC
Eclipse
Eclipse has a built-in option to create a "helloworld" app. You simply go to File->New->C++ Project->Hello World C++ Project (Under the executable dropdown)->Enter a project name->Finish
Then you just click the run button and you should see "Hello World!!!" in the terminal at the bottom of the Eclipse window. If you still get this same error you did previously respond to this and I'll show you how to check to see if you have gcc installed.
If that doesn't help visit this blog post from July 2010 detailing how to achieve your goal.
http://max.berger.name/howto/cdt/cdt.jsp
-AHC
You should already have gcc but try this just in case:
sudo apt-get install gcc
If that doesn't do anything then you have gcc installed and the problem is probably with eclipse.

Eclipse Ganymede and MinGW in Windows

I'm trying to get eclipse to work with MinGW.
I've done the following:
Downloaded CDT for eclipse.
Installed MinGW.
Added C:\MinGW\bin to my path.
Opening a command prompt (CMD) and typing g++ or alike works fine.
I run eclipse, create a "New C++ Project", and only get the option saying "other toolchains".
There's a MILLION tutorials out there saying eclipse should identify MinGW on its own. It doesn't, and I don't know what to do. I've tried reinstalling everying in just about every order posible. Still no luck.
I've also noted some tutorials say something about creating a "Managed C++ Project". I've no such option, all I get is "C++ Project" and "C Project"
edit:
I have eclipse ganymede, windows x86_64, version 3.4.2
http://download.eclipse.org/eclipse/downloads/drops/R-3.4.2-200902111700/index.php
Running the "Eclipse IDE for C/C++ developers" fails, since there's no x64 version for windows. The x86 version requires x86 JAVA installed as well, and installing two versions of java, gave nothing but trouble in the past.
The instructions for setting up MinGW in Ganymede are located here.
The following are instructions and
links on how to install the current
version of MinGW. Note that these
links may become inaccurate over time
as new versions of MinGW components
are introduced. Please check the MinGW
File Release section for the latest
versions.
Download and run the MinGW setup program, MinGW-5.1.3.exe.
Select download and install the MinGW base tools and the g++ compiler.
You may select the Current or
Candidate version of these tools. You
may also install any of the other
available compilers as well.
Do not install the MinGW Make feature as the MSYS version of make
from step 5 is a more complete
implementation of make.
The MinGW setup program currently does not install the gdb
debugger. To install the debugger,
download the file from the following
location: gdb-6.6.tar.bz2
Extract the contents of the file gdb-6.6.tar.bz2 to the same location
where you installed MinGW.
If you want to use Makefile projects, download and run the setup
program from the following location:
MSYS-1.0.10.exe. MSYS provides an
implementation of make and related
command line tools. This is not
required for other types of projects
with the MinGW toolchain, which use
CDT's internal build tools to perform
the build.
Following this process resolved any problems I had.
I had the same exact problem with Eclipse Galileo and CDT 6.0.1. It turns out that CDT only recognized MinGW when it's located under c:\mingw. I had it in c:\msys\mingw so that was the problem. After I changed that everything worked fine.
The distinction between managed make projects and makefile project was removed in CDT 4.x, I think. Now there is only one type of project, but you can select different builders. CDT includes an internal builder which does not use makefiles and another one which does.
First, save yourself the effort of "reinstalling in every order possible". That is also known as trial-and-error, and will only make you more frustrated. Apply the normal problem-solving skills you have as a programmer.
Given that you have MinGW installed, what happens if you download "Eclipse IDE for C/C++ developers", start eclipse.exe, and try to create a C++-project with a MinGW toolchain?
EDIT: remember: the key in getting help with problems like these is to produce a minimal example which fails. Also, it would help if you provided URLs to the packages you installed (MinGW, Eclipse, etc.).
EDIT: I just installed CDT using the Ganymede update site, downloaded and installed MinGW from here, and restarted Eclipse, and everything worked fine. I know that doesn't help you, but it does prove that the toolchain detection isn't completely broken. Something is weird on your side.
You could try Wascana Desktop Developer. Its a distribution of Eclipse CDT configured specifically for developing on Windows.
I had the same problem (i.e. Eclipse not finding MinGW on the PATH) after I removed some of the unused files/folders from MinGW. It was ~600 MB and I was tasked to trim it down before adding to source control. I got it down to a workable ~200 MB. When I tried to re-create an Eclipse workspace afterwards, MinGW disappeared from available toolchains. It reappeared after I put the original MinGW install on the path.
HTH