Eclipse CDT not launching executable - eclipse

I've been using MinGW, no real problems until Eclipse decides it doesn't want to run the executables any more. The run config is still the same, the project builds 100% fine, and I can run the built executable from command line/GUI. The console in Eclipse is empty, save for on the top bar followed by the executable name and time/date.
Just made a hello world project from the menu, same thing happens to it.

I just had the same error, and here is what I did:
Proper binary parser must be selected so Eclipse can recognize the executable: Select the project, then right click.
Project->Properties->C/C++ Build->Settings->Binary Parsers, PE Windows Parser (or you can select Cygwin if you use that compiler, on Linux I use Elf parser.).
That worked for me at least for Cross compiler (both on Windows 7 and Ubuntu 12.04)

Related

Configuring Eclipse for using with MSYS2

My I use Eclipse Mars and MSYS2. Eclipse does not recognize my MSYS2 installation. It contains Mingw-w64 for 32 bit compilation. Things I have found on the Internet did not work. What should I do?
Well, a bit late to the party, but it looks like there is nothing special about MSYS2: the usual procedure of setting up Eclipse to work with MinGW-w64 installation worked for me just fine.
The main issue is that as described in Eclipse CDT FAQ to detect MinGW toolchain CDT tries to find mingw32-gcc.exe in PATH, while MinGW-w64 have only gcc and i686-w64-mingw32-gcc.exe in its bin directory, so just adding MinGW-w64 bin directory to PATH won't work:
Despite having g++.exe or gcc.exe on your PATH and having defined
MINGW_HOME, you may still get a “Toolchain "MinGW GCC" is not
detected” message (CDT 8.4 on Luna 4.4.0). Make sure that a file
called "mingw32-gcc.exe" exists in MINGW_HOME\bin.
As it mentioned further in Eclipse CDT FAQ, the easy fix would be to copy i686-w64-mingw32-gcc.exe to mingw32-gcc.exe:
If it doesn't exist
(which happens with MinGW-W64), copy a -gcc.exe file (e.g.
i686-w64-mingw32-gcc.exe) to mingw32-gcc.exe. If the dreaded message
still lingers around, reboot your system (don't just logout and
login).
After you did the copying described above, you can add MinGW-w64 bin directory to PATH and Eclipse will recognize the MinGW-w64 installation as MinGW toolchain. Since I don't like idea of polluting neither system nor user environment variables in Windows settings, I usually write a short batch file which adds MinGW-w64 bin directory to PATH and then starts Eclipse for me:
SET PATH=c:\msys32\mingw32\bin;%PATH%
START c:\eclipse\eclipse.exe
Even more later to the party - for me worked this solution: Right click project -> Properties -> C/C++ Build -> Environment: set environment variable MINGW_HOME to C:/.../msys64/mingw64 click OK, and rest is automatically done by eclipse

Error in Open MPI run configurations with eclipse kepler

I have created a simple Open MPI project from default list ("MPI Pi C Project") using eclipse-kepler and PTP tools 7 (both latest). The project builds without any errors, and if I click on run, the output is also shown. However, when I configure project through "Run Configurations", and then press on "run" button, it gives me this error:
"Can't open perl script "C:/Documents": No such file or directory".
I tried my best to find out the reason of this error. At least in the "Path" variable, there is no path that contains "C:/Documents".
I am working on windows xp, with cygwin installed. The perl is also installed with cygwin, and working. Thank you in advance.

How to set path to `gfortran` in Eclipse?

A colleague got a new mac, and he codes with Eclipse and gfortran. And Makefiles. But now he cannot build.
I figured that Eclipse does not use the same PATH as shell, so while Eclipse is happy to build with a makefile, it cannot find gfortran. (The Makefile works fine when ran form the mac terminal.)
Eclipse can build, if I put the full path in the Makefile (FC=/usr/local/bin/gfortran). But this is extra nuisance when other people use Ubuntu where gfortran has a different path.
Question: How/where to configure Eclipse (Juno) so that it can find gfortran? (I could not find, I tried.)
Why not just use Photran. It is based on Eclipse and is set up for Fortran.

How do I set the build path for E-P-I-C in Eclipse Galileo?

I have E-P-I-C installed on Eclipse Galileo. When I go to run a Perl script nothing happens because I don't believe is any connection from Eclipse to the Perl SDK (is that the right term? I don't know if it is different because it's Perl).
I'm pretty sure it has something to do with C:\Perl\bin
If I click on Perl E-P-I-C project and click on properties I can then see
Perl include Path. I have added the above but it didn't change anything.
What this comes down to is: How do I set up the build path for Perl in Eclipse Galileo?
Normally, the PerlDistribution asks to be added to your %PATH%. For me it added D:\strawberry\c\bin and D:\strawberry\perl\bin. My Eclipse Galileo uses that environment variable out of the box.
You can set the perl executable for a .pl file using Window->Preferences->Perl EPIC and use the File Selector. Works for me with strawberry and standard cywin perl. The perl version shipped with MsysGit seems like it can't handle EPIC breakpoints. Haven't tested with ActiveState Perl so far.
Vista user here. I have Activestate Perl and it also installed into c:\perl5.10, and added the executable to the %PATH%.
Thus, In my Window/Prefrences/Perl EPIC Menu, the executable is called "perl". No .exe, no absolute path. E-P-i-C has probably found it by searching in the default install locations.
In eclipse, you need to run your perl script once using a right mouse click "run as ...perl local".
THen this script shows up in the Menu "Run > Run configurations." For simple scripts, the default values in the tab dialogs are all ok (most are empty). Output is written to the console window. Make it visible using Menu Window > View > Console.
Does your perl script generate any output?
Perl Debugging from Eclipse does not work for me either. A dialog box pops up and says I shpuld read the discussion thread for ticket #290... on sourceforge. A very complex matter indeed.

How to launch eclipse from a command line on MacOS with a workspace pathname

On linux:
eclipse PathnameToWorkspace
works fine, and launches eclipse on the workspace.
I've never been able to figure out the MacOS moral equivalent, given the MacOS application tree structure.
I suspect this is not a hard problem.
./eclipse -data <workspace-path> (see also How do I run Eclipse in the Eclipse Wiki).
On my system there's a link to the eclipse binary from /Applications/eclipse/eclipse, and I find that just running that will start Eclipse with my default workspace.
You might also find the Eclipse binary in '/Applications/Eclipse.app/Contents/MacOS/eclipse'.
When I start Eclipse like this (from the command line) I find that my Mac will not always switch to the desktop where Eclipse is started, so that I will have to go hunt for the Eclipse window with Exposé/Misson Control (Ctrl-Up Arrow). – This is especially true when I'm have two monitors connected to my Mac.
Since I found typing the full path to eclipse annoying, I simply added a symlink to it from /opt/local/bin and made sure that directory is in my $PATH:
cd /opt/local/bin
sudo ln -s /Applications/eclipse/eclipse .
echo 'PATH="$PATH:/opt/local/bin' >>~/.bashrc
After that, just issuing the command eclipse (without the preceding /Applications/eclipse part) works as it should.
After doing lots of hit and try I have added following into my bash_profile and I am able to launch eclipse from terminal.
(Note: Eclipse is inside Application)
export PATH="$PATH:/Applications/Eclipse.app/Contents/MacOS"
Hope it will be helpful for beginner like me.