Eclipse with CDT not compiling at all - c++

I have been trying out using Eclipse CDT for a course I am taking. Previously I have been using Visual Studio Express but since that requires me to be online and I have to use the IDE+compiler offline, I switched to Eclipse + Cygwin GCC.
Now everything was working prefectly, until I got an error about file paths in my make file. After reading some of the posts online, the issue seemed to be that Cygwin's make does not resolve absolute Windows file paths because of the ':' symbol and confuses it with a new target definition. The proposed fix was to download a fixed make file. I diligently did so and the programs would compile fine.
But after I went into the first debug session, everything froze. I aborted eclipse and tried a clean build but now the compilation wont happen AT ALL, which is very weird for me.
I can't find a post for a similar problem so I am really stuck now. I was currently working the assumption that my CDT may be corrupt or something so I downloaded Eclipse Luna just today and tried building using that, but no joy. Even a fresh project in a new workspace wont compile.
Appreciate the help in advance.

Did you try redownloading Eclipse? Sometimes Eclipse gets a fatal error glitch that makes it unable to compile anything. I've had this problem before, the only way i was able to fix it was to uninstall and re download the latest version. If this doesnt work, try switching to Bloodshed Dev C++ or codeblocks.

So it seems like an issue with the new make (v3.80). upgating it to v4.08 fixed the issue of not building.
Version 4.08 however does not fix the Windows file paths not being recognized properly and treated as a target definition. I am still getting the multiple target patterns. stop error.
EDIT: Found this on Stack overflow to solve the issue... should have searched better previously.
Very simple application fails with "multiple target patterns" from Eclipse

Related

OpenCV in Code::Blocks: The application was unable to start correctly (0xc00000be)

I set up OpenCV with Code::Blocks as per this tutorial: http://kevinhughes.ca/tutorials/opencv-install-on-windows-with-codeblocks-and-mingw/.
I've got as far as building the test program at the end successfully, but when I try to run it I get the following error: "The application was unable to start correctly (0xc00000be). Click OK to close the application."
The one thing that is certainly different from the tutorial for me is that I'm working with OpenCV 3.0.0, Code::Blocks 13.12 and the latest version of mingw (number not obvious from their website or the installer).
I found that other people had had this problem in the past, e.g. The application was unable to start correctly (0xc00000be)
However, it has been a long time since that thread was active, I'm working with newer versions of the software and, most importantly, the answer given there didn't help (I compiled openCV with the same mingw that I'm using with Code::Blocks), so I thought this question would be worth asking (sorry if it's not, I'm rather new to this).
Could anybody suggest a fix that might get rid of this error?
A few other things to note:
I didn't download the Code::Blocks that came with mingw as I was advised against it, I got them separately as per the tutorial
I have installed OpenCV and Code::Blocks on my E: drive, though mingw is still on my C:.
I have added both mingw and OpenCV to my PATH variable, and mingw to my Path variable
I have linked the libraries in both the main compiler settings for Code::Blocks and the Build Options of my project.
I'm working from a 64-bit Windows 7 Laptop, but I have done everything 32-bit style as advised in the tutorial.
Thanks in advance!
So, one solution I've found to this problem is to copy all the .dll files from "...\opencv\build\x86\mingw\bin" to the project file (build directory).
Having done that, the project will run fine. This still doesn't (directly) explain why it wont run without those files (at least, several sources including the tutorial imply it should), and so isn't really optimal. I will continue to look for a solution for this so I don't have to clutter every opencv project I make with the .dlls.
However, for anyone simply wanting to get stuck into coding who is having this problem, I recommend that solution.

Eclipse not building properly

Okay so basically I'm working on recursion. And I recently switched from a mac to a PC, so I'm now using eclipse instead of XCode for programming c++. now this has happened to me a couple times, and I still have no idea why its doing it. When this happens I do not get an error code, I've searched far and wide for this solution but haven't found one yet, so i'm hoping you guys could help. So everything was going great (almost finished), but i realized a bug, so I fix it, then I save it, then I build it, run it, then it doesn't build properly (i'm assuming), like it didn't build my new code, it just rebuilt my old code and ran that, im using MinGW, I've also tried to import my old code via copy and paste, but it did the same thing, please help.
*let me know if I left anything out that might be needed to know
**update on my project file it does have a error sign on it, but there isn't one in my code
***update update I looked through the errors and found that it doesnt have permission to open output file "recursive.exe" (my project name)
OK solution: run eclipse as admin

Eclipse CDT crashing when trying to index header files

I'm successfully cross compiling C++ code to run on a raspberyy pi from a Windows 7 machine through Eclipse Kepler SR1. Although the compilation is successful, there is a problem with the error parsing on the editor. It's showing red lines (errors) for functions/definitions such as cout, endl, string, etc.
When I click on Project->C/C++ Index->Search for Unresolved Includes I can see that it complains that bits/c++config.h, bits/c++allocator.h and similar files are unresolved. So, I did a grep and found these and included the director under Project Properties->C/C++ Build->Settings->Tool Settings->Cygwin C/C++ Compiler->Includes and Eclipse just crashes. I noticed that it generates the attached log file. This seems like a nasty bug or a huge error on my part. Is there a way to resolve this issue?
Here is the error log file.
This answer not pretend to be a solution. Just a set of thoughts
There are many-many bugs in CDT. Try latest development versions in hope that someone fixed your issue.
Update sites (to install/update via "Help"->"Install new software"->"Add..." dialog):
http://download.eclipse.org/tools/cdt/builds/luna/milestones (for Luna milestones)
http://download.eclipse.org/tools/cdt/builds/8.4/nightly (for 8.4 nighlies )
Or download directly from CDT page.
You can also check their Bugzilla and forums if there are bug report for that issue and solutions/workarounds. And surely you can check out CDT source code and actively participate in bug fix ;)
Personally, I use latest milestones, because of indexer: 8.4 better understands C++11.
Hope it helps.

Error: No Mount Point For (/) defined

I am trying to get the NetBeans IDE to work with the g++ compiler. I am downloading from cygwin. I've tried googling the problem and I have tried many things to get C++ to work on NetBeans. I can't figure out the magic trick so I am asking for your help.
I have two problems, I don't know if these problems are related to each other.
Problem one: I get this error when I try to run my small program.
Problem Two:I get a "Cannot find include file <iostream>". When I hold ctrl and hover over the include directory my compiler says Unresolved directive #include<iostream>
I followed this NetBeans Guide on how to install and configure C++ support. Following those directions I had received the two errors above.
Here is what my environment variable looks like: this
Here is what the C/C++ build tools look like for NetBeans: this
Here is the code I am trying to run; this
At the moment I am installing everything from the development tab in the cygwin setup program.
I've tried messing with different settings but the two problems were still there.
I've tried running NetBeans in admin mode but the two problems were still there
I've tried un-installing cygwin and installing minGW. That fixes problem number one, but the there is no output when the program runs.
I've tried adding C:\cygwin64\lib\gcc\x86_64-pc-cygwin\4.8.2\include\c++ to the "Include Directories and Headers" in Properties -> Build -> C++ Compiler. This resolved iostream, but the other directives under iostream had the same problem, that the other include files could not be found.
I've been at this problem for five hours or so. Any help would be appreciated.
Here is what I am running:
Windows 7 64 bit
NetBeans 7.4
If you need anything else, just ask.
The answer was that my firewall, comodo firewall, was sand boxing the files that needed to run. After disabling the sand boxing feature NetBeans ran fine.

Eclipse CDT syntax coloring issues

First off, I am running Eclipse 3.7.2 Build: M20120208-0800 on Ubuntu 12.04 (installed using the eclipse-* packages). I have applied all the updates available, but am still seeing the issue described below...
When I open a C++ file (*.h or *.cpp), it correctly highlights all object names in the file, but if I add new code to the file Eclipse will not apply coloring to the new code lines. However, if I restart Eclipse the new code will be correctly colored.
The indexer also appears to be working correctly because code completion seems to be working properly. The logs also appear to be clean. Has anyone seen this behavior before? Is there a good way to reset Eclipse to correct this issue?
Thanks!
My solution to this problem was to re-install the eclipse packages for Ubuntu 12.04. My syntax highlighting came back!