I have a problem using a vector in C ++. I work with MinGW on Windows + NetBeans.
The following code:
#include <vector> using namespace std; int main(int argc, char** argv){ vector<int> vec; return 0; }
It compiles without any errors, but at startup it always fails with an output value of -1.073.741.511 or a value of 127 (this means ERROR_PROC_NOT_FOUND).
Running exe directly appears with an error message, for example:
entrypoint '__gx_personality_v0' not fount in 'libstdc++-6.dll'.
I already tried -lstdc++ and
#include <cstdlib>
So what is the problem and how to solve it?
NetBeans Output:
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf make.exe[1]: Entering directory `/c/Users/Josch/CppApplication_1' "/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW1-Windows/cppapplication_1.exe make.exe[2]: Entering directory `/c/Users/Josch/CppApplication_1' mkdir -p build/Debug/MinGW1-Windows rm -f build/Debug/MinGW1-Windows/main.od g++ -c -g -MMD -MP -MF build/Debug/MinGW1-Windows/main.od -o build/Debug/MinGW1-Windows/main.o main.cpp mkdir -p dist/Debug/MinGW1-Windows g++ -o dist/Debug/MinGW1-Windows/cppapplication_1 build/Debug/MinGW1-Windows/main.o make.exe[2]: Leaving directory `/c/Users/Josch/CppApplication_1' make.exe[1]: Leaving directory `/c/Users/Josch/CppApplication_1' BUILD SUCCESSFUL (total time: 4s)
EDIT: Of course, main should return int-fixed and add using the std namespace;
Josch source share