Issue with eclipse juno for c,c++ in windows - c++

I am using MinGW for running c programs in eclipse juno in windows. My programs runs fine most of the times. But sometimes even though i dont have any errors in project, I get an error saying "There are errors in the project, do you want to continue". The problem gets resolved when I restart the eclipse and clean and build the project.
How can I resolve this issue. Pls help
Thanks in advance!!

Make shure you have ...
no missing includes
set proper C / C++ standard (if required)
Current Eclipse Version (maybe yours doesn't support current C / C++ standard)
no marker in error/warning view
no old compiled files in your output dir (use clean command)

Related

Building glfw3 programs in CodeBlocks 16.01 in Windows 7 failed

I am using CodeBlocks 16.01 in Windows7. I have downloaded GLFW windows binary from here. I have copied include and lib-mingw to my project folder. Have provided the include and lib-mingw directories for Compiler and Linker options respectively in the build options. In the Linker settings tab, I have added glfw3,gdi32 and opengl32. I'm running the sample program given in the documentation page of the GLFW website. The program is compiling. While building a warning and an error message is displayed:
Warning: .drectve `-aligncomm:"__glfw",5' unrecognized
And
init.c undefined reference to `__chkstk_ms'
Have googled a lot, but in vain. Any help would be great.
Today the problem is solved. The problem was with the compiler settings in CodeBlocks. In CodeBlocks, under "Settings" tab "Compiler"->"ToolchainExecutables", it was "Dev C++". I installed TDM-GCC-32 (http://tdm-gcc.tdragon.net/download) 32 bit version. Then changed "Dev C++" with the directory where TDM-GCC-32 is installed in my computer.
Next in "Settings"->"Debugger" option, I selected "GDB/CDB Debugger" and "Default". Then provided the path of gdb32.exe located in the TDM-GCC-32/bin directory.
I think as I had installed Dev C++ before installing codeblocks, Dev C++ was selected by default (not sure). For those who are facing similar problems but DEV C++ is not their case, updating TDM-GCC may help.
However, this DEV C++ compiler was working for older GLFW 2.7. Today, I have also found another problem with this DEV C++ one. I was using freeglut. When I was including iostream along with GL/glut.h similar "undefined reference to `__chkstk_ms'" error message was appearing.
But now, it is ok. Thank you all :)
looks like you need to add library(.lib) with this stuff. .h file has been
deployed already so you need to detect it. Then you can google for library.

Eclipse with CDT not compiling at all

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

Not able to compile C++ in NetBeans IDE - Gives error "CreateProcess error=193, %1 is not a valid Win32 application"

I'm trying to build a C++ application in NetBeans 7.3. I'm using the MinGW compiler & I set up the project as a new project from an existing makefile. When I try to compile, I'm getting the following error from NetBeans:
CreateProcess error=193, %1 is not a valid Win32 application
I've looked at the NetBean's forums and I've done the following:
Ensured that my Path variable included the MinGW bin.
Ensured that NetBeans C++ extensions were installed.
Can anyone give me some pointers on where to look next - I'm not terribly familiar with C++. I should mention that I'm running on a 64 bit machine, but I'm unsure if this is causing my problem.
Please check these points too:
Make shure there are no blanks in paths (eg. path to gcc or source files should not contain any blanks)
Do you call any shellscript or other linux / unix stuff within your makefile?
If you setup a new project (like a default c/c++ application) - does this work?
Since you're using an existing source / makefile: can you compile your project on another system?
Do you have mingw msys installed?
are there any other informations or is this the only error / message you get?
What version of MinGw are you using?

c++ program failed to run on another pc with libgcc error

I wrote some simple code in C++, and I built it and ran it on my laptop, and everything as working. When I tried to run the .exe file on my brother's laptop, it gave me this error The program can't start because libgcc_s_sjlj-1.dll is missing from your computer. Try reinstalling the program to fix this problem. Am I missing something that I should have added or something?
Note: I don't know if it matters or not, but I'm using Code::Blocks.
Thanks
It matters because you used Code::Blocks. If you don't know about it, you most probably used Code::Blocks with MinGW. Install it on that machine followed by a reboot may fix it.
C++ programs need to have a runtime library -- you can think of it as needing .NET Framework to run C# or JRE to run Java programs. Visual C++ uses msvcrt (known as Visual C++ Runtime). Many installations of Windows seem to come with msvcrt by default which may explain why people using MSVC is less likely to run into issues like this.
If you statically link the CRT (C Run Time) you can lift the requirements of the clients having to have the DLL files installed, at the expense of having a larger .exe file.
A relevant SO answer: The program can't start because libgcc_s_dw2-1.dll is missing
You can place that DLL in the same folder as the .exe on your release and it should work

Eclipse live error checking disabled

Few days ago I had to reinstall all my Linux system, and I also had to reinstall Eclipse CDT as I used to work with it since few weeks.
Unfortunately, since then I do not have live error checking anymore... and I miss it ;)
If I create a new Hello World C++ project (New / C++ Project / Hello World C++ project) and then add some errors like calling a method from an nonexistent class or adding any undefined or untyped variable, well Eclispe doesn't underline and report them as it was doing before I had to reinstall it all.
I searched stackoverflow, and tried to deactivate/reactive "Build automatically" without any change. I also verified that the project path is included in the project sources (Project properties / C-C++ general / Path and Symbols / Source Location) but as it already was, it didn't solved the problem.
When I "Build All" the errors are well reported in the "Problems view", and then when I fix one problem and save the file, the error disappear from the Problem view, but then if I add another problem and save, nothing is reported until I build again. Even errors turned to comments still remains underlined until the next "build all".
Do you have any idea to help me reactivate this feature ?
I was under Eclipse Linux 3.5 and I now use Eclipse Linux 3.7.
I installed the Eclipse package: Eclipse C/C++ IDE Indigo SR-1 with Eclipse Platform 3.7.1 and that fixed the problem.
So I guess, there was a problem with the 3.7.0 currently provided by the Ubuntu Software Center.
With this new version all is Ok by default.