Segmentation fault Netbeans 7.1 C++ - c++

I want to build and run my project in Netbeans. I generated a simple class (nothing edited) and did run it.
This is what was shown in the output:
make: *** [.validate-impl] Segmentation fault
nbproject/Makefile-impl.mk:90: recipe for target `.validate-impl' failed
BUILD FAILED (exit value 2, total time: 678ms)
I already installed Cygwin and the C++ compiler is set.
I hope you could help me!

You seems to not have the binary needed to execute make.
Try this :
install MSYS or Cygwin
Then :
In netbeans go to Tools --> options
Go in C/C++ pane, and here set your g++ compiler (you find it in the install directory of above tools) and your make command

Related

why I'm getting error in executing my C++ code

I have installed MinGW 3 times and I've also added path in env. variable but whenever I try to run a code in CodeLight it just gives me the following error:
mingw-32-make.exe: *** [ALL] Error 2
In MinGW installation tutorials there are .exe files in the bin folder but I don't have any .exe file in the bin folder inside MinGW. I've tried installing it 3 and very carefully.
Can someone help me out?
Make sure the compiler and build tools are properly configured in the IDE (CodeLight).
Installing MinGW by itself doesn't tell CodeLight were to find it.
There is a standalone MinGW-w64 personal build available at http://winlibs.com/ that doesn't need installation, just unzip it. On the site there is an explanation on he wot configure Code::Blocks IDE to use this compiler. The steps should be pretty similar in CodeLight.

Recipe for target failed error in Eclipse using cygwin

First of all, I know that this question already exists multiple times in Stackoverflow but the answers provided for all of them didn't solve my issue(See section "Solutions worked for others" at the end of this question).
I am using the Eclipse IDE(Juno) with CDT plugin and Cygwin installed in my Windows-7 64-bit platform.
I successfully compiled and run the Hello World 'C' program but the Hello World "C++ program" is having Launch failed. Binary not found error.
I am also having recipe for target project.exe failed error in my auto-generated makefile.
Error line in makefile: #echo 'Building target: $#'
Additionally:
In c/c++ build -> toolchain editor ->
Current toolchain : Cygwin GCC
Current Builder : Gnu Make Builder
Used Tools:
GCC Assembler,
GCC Archiver,
Cygwin C++ Compiler,
Cygwin C Compiler,
Cygwin C Linker,
Cygwin C++ Linker.
When I change Current Builder from "Gnu Make Builder" to "CDT Internal Builder" the recipe for target project.exe failed error disappears but the Launch failed. Binary not found error still exists.
And also I dont have MinGW installed.
Solutions worked for others :
Before running the project directly using the run command, first Build the project and then run.
I build the project every time before I run it.
Eclipse can't find or point to an .exe file but the exe file runs fine when run from windows explorer and the answer to it is add -arch i386 to miscellaneous under linker.
My build runs without error but not creating the exe file. So this doesnt apply to me
Project->Properties->C/C++ Build->Settings->Binary Parsers
set "Cygwin PE Parser" and/or " PE Window Parser" and alike.
Tried all of them with different combinations but did not work
I also did :
adding the cygwin install dir to the path variable
added all the includes folders needed for cygwin for both GNU C and GNU C++ in Paths-and-Symbols -> includes
Saved the project before building and then running
restarted eclipse again
checked if g++ is installed using which g++ in terminal
and so on.
What could be a fix to this problem? Or do I have to install MinGW (I tried already to install MinGW with the installer.exe they provided and it failed on downloading the files several times) and try again.
I couldn't find the solution. Please show me what am I missing here.
Thanks in advance.

Dev-C++ giving error for Makefile.win and g++ stopping

I have installed Dev-C++, but when I make a C program and run it, it gives me an error, like:
C:\Users\Ved\Dev-Cpp\Makefile.win [Build Error] [Project1.exe] Error 1
And when I checked the log it shows the following:
Compiler: Default compiler
Building Makefile: "C:\Users\Ved\Dev-Cpp\Makefile.win"
Executing make...
make.exe -f "C:\Users\Ved\Dev-Cpp\Makefile.win" all
gcc.exe main.o -o "Project1.exe" -L"C:/Users/Ved/Dev-Cpp/lib"
gcc.exe: Internal error: Aborted (program collect2)
Please submit a full bug report.
See <URL:http://www.mingw.org/bugs.shtml> for instructions.
make.exe: *** [Project1.exe] Error 1
Execution terminated
I have used Dev-C++ on my friends computer running Windows XP SP3, and it runs fine and gives the output.
I am using Windows 8 64 bit, can I actually run Dev-C++ on 64 bit?
And can this error be fixed?
I have used the old Dev-C++ in the past and I've have had it break randomly on me at times..
Bloodshed Dev-C++ hasn't been updated for years and development has actually stopped on it.
If you really like the environment consider getting the updated and maintained Orwell Dev C++ that is improved, faster and much cleaner.
This is Solution to Solve error easily
Close All, then Go to Project options and in linker tab write the following and click ok:
-lopengl32
-lfreeglut
-lglu32
Now execute the program
Just close all the other tab in project. It will run normally
Check if in the compiler directory there is g++.exe.
If you can see it go to:
Installing c++/g++ on Windows
and download the file full.exe then follow the instruction and put the directory in path. After that restart your pc, go to the cmd and try to compile there. If it works change the toolchain of the IDE. If you need help contact me :)

Mingw compiler and Eclipse CDT

Today I tried to compile a c++ program in Eclipse CDT for the first time, and the error that is came up was Program "make" not found in PATH , so I searched on google for the problems and I have found many similar solution to my problem, but no problem was like my one.
First I tried to reset the enviroment variables, but nothing changed, and then I uninstalled Mingw and reinstalled following this instruction, and using the command gcc --version it says that it is well installed. the next step is installing MYSYl, and checking the installation with the command mingw32-make gives
mingw32-make: *** No targets specified and no makefile found. Stop.
Instead of No Target Specified, but in an other answer on stackoverflow it's said that this means that it works. So I continued following the guide, and at the end, when I build my helloword project I get two errors:
mingw32-make: *** [all] Error 1
recipe for target 'all' failed
I can't find where I did wrong searching on google, can you suggest it me?
Another thing, if I go on Eclipse in Window->Preference->c/C++->Build->Enviroment there are no variable there, how can I add Mingw there?

Compile Cygwin project in Eclipse

I have a c++ Project that was compiled with the cygwin toolchain, now I want to use Eclipse to compile and test it.
If I create a project (cygwin toolchain is set in the options) I get the error:
make: *** No rule to make target `all'. 7wWin line 0 C/C++ Problem
In Cygwin I use:
cd $BUILDDIR
make
make install
Can Eclipse create it's own makefile? And how to setup that.
Better would be a good tutorial how to compile a Cygwin c++ project with Eclipse.
Check the following pages:
http://homepage.cs.uri.edu/courses/fall2007/csc406/Handouts/eclipseTutorial.pdf
http://wikimix.blogspot.com/2006/11/using-eclipse-as-c-development_05.html
http://www.benjaminarai.com/benjamin_arai/index.php?display=/eclipsecygwingcc.php