i have installed msys and also add path to bin in system but still got some errors.
"/C/msys/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/d/NetBeansProjekty/CppApplication_2'
"/C/msys/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/cppapplication_2.exe
make.exe[2]: Entering directory `/d/NetBeansProjekty/CppApplication_2'
mkdir -p build/Debug/MinGW-Windows
rm -f build/Debug/MinGW-Windows/main.o.d
g++ -c -g -MMD -MP -MF build/Debug/MinGW-Windows/main.o.d -o build/Debug/MinGW-Windows/main.o main.cpp
make.exe[2]: g++: Command not found
make.exe[2]: *** [build/Debug/MinGW-Windows/main.o] Error 127
make.exe[2]: Leaving directory `/d/NetBeansProjekty/CppApplication_2'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/d/NetBeansProjekty/CppApplication_2'
make.exe": *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 852ms)
Can you tell me wheres problem?
now I added mingw path but also popped new derror
"/C/msys/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE=
SUBPROJECTS= .build-conf make.exe[1]: Entering directory
`/d/NetBeansProjekty/CppApplication_2' "/C/msys/bin/make.exe" -f
nbproject/Makefile-Debug.mk
dist/Debug/MinGW-Windows/cppapplication_2.exe make.exe[2]: Entering
directory `/d/NetBeansProjekty/CppApplication_2' mkdir -p
dist/Debug/MinGW-Windows g++ -o
dist/Debug/MinGW-Windows/cppapplication_2
build/Debug/MinGW-Windows/main.o build/Debug/MinGW-Windows/newmain.o
build/Debug/MinGW-Windows/newmain.o: In function `main':
D:\NetBeansProjekty\CppApplication_2/newmain.cpp:5: multiple
definition of `main'
build/Debug/MinGW-Windows/main.o:D:\NetBeansProjekty\CppApplication_2/main.cpp:15:
first defined here collect2.exe: error: ld returned 1 exit status
make.exe[2]: *** [dist/Debug/MinGW-Windows/cppapplication_2.exe]
Error 1 make.exe[2]: Leaving directory
`/d/NetBeansProjekty/CppApplication_2' make.exe[1]: *** [.build-conf]
Error 2 make.exe[1]: Leaving directory
`/d/NetBeansProjekty/CppApplication_2' make.exe": *** [.build-impl]
Error 2
I rewrote the paths and restarted the program and its working.
Related
PRINT*, 'Hello World'
END
After typing the above in Fortran for the first time, I get the error below. I can't seem to figure out what to do.
cd 'C:\Users\sylvi\Documents\NetBeansProjects\CppApplication_1'
C:\MinGW\msys\1.0\bin\make.exe -f Makefile CONF=Debug
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/c/Users/sylvi/Documents/NetBeansProjects/CppApplication_1'
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/cppapplication_1.exe
make.exe[2]: Entering directory `/c/Users/sylvi/Documents/NetBeansProjects/CppApplication_1'
mkdir -p dist/Debug/MinGW-Windows
g++ -o dist/Debug/MinGW-Windows/cppapplication_1 build/Debug/MinGW-Windows/main.o build/Debug/MinGW-Windows/testfortran.o
build/Debug/MinGW-Windows/testfortran.o: In function `main':
C:\Users\sylvi\Documents\NetBeansProjects\CppApplication_1/testfortran.f90:2: multiple definition of `main'
build/Debug/MinGW-Windows/main.o:C:\Users\sylvi\Documents\NetBeansProjects\CppApplication_1/main.cpp:21: first defined here
build/Debug/MinGW-Windows/testfortran.o: In function `MAIN__':
C:\Users\sylvi\Documents\NetBeansProjects\CppApplication_1/testfortran.f90:1: undefined reference to `_gfortran_st_write'
C:\Users\sylvi\Documents\NetBeansProjects\CppApplication_1/testfortran.f90:1: undefined reference to `_gfortran_transfer_character_write'
C:\Users\sylvi\Documents\NetBeansProjects\CppApplication_1/testfortran.f90:1: undefined reference to `_gfortran_st_write_done'
build/Debug/MinGW-Windows/testfortran.o: In function `main':
C:\Users\sylvi\Documents\NetBeansProjects\CppApplication_1/testfortran.f90:2: undefined reference to `_gfortran_set_args'
C:\Users\sylvi\Documents\NetBeansProjects\CppApplication_1/testfortran.f90:2: undefined reference to `_gfortran_set_options'
collect2.exe: error: ld returned 1 exit status
make.exe[2]: *** [dist/Debug/MinGW-Windows/cppapplication_1.exe] Error 1
make.exe[2]: Leaving directory `/c/Users/sylvi/Documents/NetBeansProjects/CppApplication_1'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/c/Users/sylvi/Documents/NetBeansProjects/CppApplication_1'
make.exe": *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 1s)
cd 'C:\Users\Deepa\Documents\NetBeansProjects\game' C:\MinGW\msys\1.0\bin\make.exe -f Makefile CONF=Debug "/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/c/Users/Deepa/Documents/NetBeansProjects/game' "/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/game.exe
make.exe[2]: Entering directory `/c/Users/Deepa/Documents/NetBeansProjects/game'
mkdir -p build/Debug/MinGW-Windows
g++ -c -g -s -o build/Debug/MinGW-Windows/main.o main.cpp
mkdir -p dist/Debug/MinGW-Windows
g++ -o dist/Debug/MinGW-Windows/game build/Debug/MinGW-Windows/main.o -lglew32 -lglew32s -lglut32
/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lglew32s
/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lglut32
collect2: error: ld returned 1 exit status
make.exe[2]: *** [dist/Debug/MinGW-Windows/game.exe] Error 1
make.exe[2]: Leaving directory `/c/Users/Deepa/Documents/NetBeansProjects/game'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/c/Users/Deepa/Documents/NetBeansProjects/game'
make.exe": *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 6s)
im using a minGW compiler but " /usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lglew32s " it seems to be in cygwin..
why is it so? and i cant build the file help please
I'm new to C++. I'm trying to run a simple example openGL application.
I have downloaded the libraries that are used from the following locations.
http://www.glfw.org/index.html
http://glew.sourceforge.net/
http://glm.g-truc.net/0.9.6/index.html
I am using NetBeans IDE as my C++ IDE. I think I have specified the correct Include Directories because the program compiles without any errors. Following is my include path.
../../../../../gl/glm;../../../../../gl/glew-1.12.0/include;../../../../../gl/glfw-3.1.bin.WIN64/include/GLFW
The command that runs when I compile is the following
CLEAN SUCCESSFUL (total time: 552ms)
C:\MinGW\msys\1.0\bin\make.exe -f nbproject/Makefile-Debug.mk build/Debug/MinGW-Windows/main.o
mkdir -p build/Debug/MinGW-Windows
rm -f "build/Debug/MinGW-Windows/main.o.d"
g++ -c -g -I../../../../../gl/glm -I../../../../../gl/glew-1.12.0/include -I../../../../../gl/glfw-3.1.bin.WIN64/include/GLFW -MMD -MP -MF "build/Debug/MinGW-Windows/main.o.d" -o build/Debug/MinGW-Windows/main.o main.cpp
COMPILE FILE SUCCESSFUL (total time: 4s)
But when running the application I get the following errors.
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/c/Users/name/Documents/NetBeansProjects/CppApplication_1'
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/cppapplication_1.exe
make.exe[2]: Entering directory `/c/Users/name/Documents/NetBeansProjects/CppApplication_1'
mkdir -p dist/Debug/MinGW-Windows
g++ -o dist/Debug/MinGW-Windows/cppapplication_1 build/Debug/MinGW-Windows/main.o -L../../../../../gl/glfw-3.1.bin.WIN64/lib-mingw -L../../../../../gl/glew-1.12.0/bin/Release/x64
build/Debug/MinGW-Windows/main.o: In function `main':
C:\Users\name\Documents\NetBeansProjects\CppApplication_1/main.cpp:19: undefined reference to `glfwInit'
C:\Users\name\Documents\NetBeansProjects\CppApplication_1/main.cpp:25: undefined reference to `glfwWindowHint'
C:\Users\name\Documents\NetBeansProjects\CppApplication_1/main.cpp:26: undefined reference to `glfwWindowHint'
C:\Users\name\Documents\NetBeansProjects\CppApplication_1/main.cpp:27: undefined reference to `glfwWindowHint'
C:\Users\name\Documents\NetBeansProjects\CppApplication_1/main.cpp:28: undefined reference to `glfwWindowHint'
C:\Users\name\Documents\NetBeansProjects\CppApplication_1/main.cpp:31: undefined reference to `glfwCreateWindow'
C:\Users\name\Documents\NetBeansProjects\CppApplication_1/main.cpp:34: undefined reference to `glfwTerminate'
C:\Users\name\Documents\NetBeansProjects\CppApplication_1/main.cpp:37: undefined reference to `glfwMakeContextCurrent'
C:\Users\name\Documents\NetBeansProjects\CppApplication_1/main.cpp:40: undefined reference to `_imp__glewInit#0'
C:\Users\name\Documents\NetBeansProjects\CppApplication_1/main.cpp:46: undefined reference to `glfwSetInputMode'
C:\Users\name\Documents\NetBeansProjects\CppApplication_1/main.cpp:49: undefined reference to `glClearColor#16'
C:\Users\name\Documents\NetBeansProjects\CppApplication_1/main.cpp:55: undefined reference to `glfwSwapBuffers'
C:\Users\name\Documents\NetBeansProjects\CppApplication_1/main.cpp:56: undefined reference to `glfwPollEvents'
C:\Users\name\Documents\NetBeansProjects\CppApplication_1/main.cpp:59: undefined reference to `glfwGetKey'
C:\Users\name\Documents\NetBeansProjects\CppApplication_1/main.cpp:60: undefined reference to `glfwWindowShouldClose'
C:\Users\name\Documents\NetBeansProjects\CppApplication_1/main.cpp:63: undefined reference to `glfwTerminate'
collect2.exe: error: ld returned 1 exit status
make.exe[2]: *** [dist/Debug/MinGW-Windows/cppapplication_1.exe] Error 1
make.exe[2]: Leaving directory `/c/Users/name/Documents/NetBeansProjects/CppApplication_1'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/c/Users/name/Documents/NetBeansProjects/CppApplication_1'
make.exe": *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 5s)
Under the Build/Linker section, I have given the following as "Additional Library Directories"
../../../../../gl/glew-1.12.0/lib/Release/x64;../../../../../gl/glfw-3.1.bin.WIN64/lib-mingw
I am using MinGW. What am I doing wrong here?
Update:
I supplied the libaries using the -l option. Now I get another error like the following.
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .clean-conf
make.exe[1]: Entering directory `/c/Users/name/Documents/NetBeansProjects/CppApplication_1'
rm -f -r build/Debug
rm -f dist/Debug/MinGW-Windows/cppapplication_1.exe
make.exe[1]: Leaving directory `/c/Users/name/Documents/NetBeansProjects/CppApplication_1'
CLEAN SUCCESSFUL (total time: 1s)
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/c/Users/name/Documents/NetBeansProjects/CppApplication_1'
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/cppapplication_1.exe
make.exe[2]: Entering directory `/c/Users/name/Documents/NetBeansProjects/CppApplication_1'
mkdir -p build/Debug/MinGW-Windows
rm -f "build/Debug/MinGW-Windows/main.o.d"
g++ -c -g -I../../../../../gl/glm -I../../../../../gl/glew-1.12.0/include -I../../../../../gl/glfw-3.1.bin.WIN64/include/GLFW -MMD -MP -MF "build/Debug/MinGW-Windows/main.o.d" -o build/Debug/MinGW-Windows/main.o main.cpp
mkdir -p dist/Debug/MinGW-Windows
g++ -o dist/Debug/MinGW-Windows/cppapplication_1 build/Debug/MinGW-Windows/main.o -L../../../../../gl/glew-1.12.0/bin/Release/x64 -L../../../../../gl/glfw-3.1.bin.WIN64/lib-mingw -lglfw3 -lglew32
../../../../../gl/glew-1.12.0/bin/Release/x64/glew32.dll: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status
make.exe[2]: *** [dist/Debug/MinGW-Windows/cppapplication_1.exe] Error 1
make.exe[2]: Leaving directory `/c/Users/name/Documents/NetBeansProjects/CppApplication_1'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/c/Users/name/Documents/NetBeansProjects/CppApplication_1'
make.exe": *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 2s)
i'm new to c++ and implementing a java application that invoking c++ library methods using java native interface. i'm using Cygwin64.
os: windows 8 64 bit
JDK: 1.7 64 bit
gcc 4.8.2
but when i try to build my project i'm getting this error
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf make[1]: Entering directory '/cygdrive/c/Users/User/Documents/NetBeansProjects/LibraryTest'
cd ../DataProcessor && /usr/bin/make -f Makefile CONF=Debug
make[2]: Entering directory '/cygdrive/c/Users/User/Documents/NetBeansProjects/DataProcessor'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[3]: Entering directory '/cygdrive/c/Users/User/Documents/NetBeansProjects/DataProcessor'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/LocationDataProcessor.dll
make[4]: Entering directory '/cygdrive/c/Users/User/Documents/NetBeansProjects/DataProcessor'
mkdir -p build/Debug/Cygwin_4.x-Windows
rm -f build/Debug/Cygwin_4.x-Windows/CppConnector.o.d
gcc -mno-cygwin -Wl,--add-stdcall-alias -shared -m32 -c -g -MMD -MP -MF build/Debug/Cygwin_4.x-Windows/CppConnector.o.d -o build/Debug/Cygwin_4.x-Windows/CppConnector.o CppConnector.c
gcc: error: unrecognized command line option ‘-mno-cygwin’
nbproject/Makefile-Debug.mk:69: recipe for target 'build/Debug/Cygwin_4.x-Windows/CppConnector.o' failed
make[4]: *** [build/Debug/Cygwin_4.x-Windows/CppConnector.o] Error 1
make[4]: Leaving directory '/cygdrive/c/Users/User/Documents/NetBeansProjects/DataProcessor'
nbproject/Makefile-Debug.mk:60: recipe for target '.build-conf' failed
make[3]: *** [.build-conf] Error 2
make[3]: Leaving directory '/cygdrive/c/Users/User/Documents/NetBeansProjects/DataProcessor'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make[2]: *** [.build-impl] Error 2
make[2]: Leaving directory '/cygdrive/c/Users/User/Documents/NetBeansProjects/DataProcessor'
nbproject/Makefile-Debug.mk:74: recipe for target '.build-subprojects' failed
make[1]: *** [.build-subprojects] Error 2
make[1]: Leaving directory '/cygdrive/c/Users/User/Documents/NetBeansProjects/LibraryTest'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make: *** [.build-impl] Error 2
i'm stacked with this java c++ integration thing for 4 days. need some help to solve this.
thanks in advance
Cygwin and gcc has remove the support of -mno-cygwin flag. Thus, you have to built the source after removing flag.
Another thing due to removal of flag you must have cygwin1.dll available along with your binaries.
If you doesn't want to attach cygwin1.dll then download Mingw compiler and compile through it.
I'm trying to set up C++11 in Netbeans 7.3, however I seem to have hit a wall. The error I'm getting is the same as in the title:
cc1plus.exe: error: unrecognized command line option '-std=c++11'
I have installed G++ 4.7.1 (which should support C++11) and have followed instructions this thread here:
Why doesn't Netbeans recognize `cbegin()`, `cend()`, `unordered_set`, among other C++ features?
Here's the console dump:
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .clean-conf
make.exe[1]: Entering directory `/c/Users/Nikola/Documents/NetBeansProjects/heap'
rm -f -r build/Debug
rm -f dist/Debug/MinGW_11-Windows/heap.exe
make.exe[1]: Leaving directory `/c/Users/Nikola/Documents/NetBeansProjects/heap'
CLEAN SUCCESSFUL (total time: 654ms)
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/c/Users/Nikola/Documents/NetBeansProjects/heap'
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW_11-Windows/heap.exe
make.exe[2]: Entering directory `/c/Users/Nikola/Documents/NetBeansProjects/heap'
mkdir -p build/Debug/MinGW_11-Windows
rm -f build/Debug/MinGW_11-Windows/main.o.d
g++ -c -g -std=c++11 -MMD -MP -MF build/Debug/MinGW_11-Windows/main.o.d -o build/Debug/MinGW_11-Windows/main.o main.cpp
cc1plus.exe: error: unrecognized command line option '-std=c++11'
make.exe[2]: *** [build/Debug/MinGW_11-Windows/main.o] Error 1
make.exe[2]: Leaving directory `/c/Users/Nikola/Documents/NetBeansProjects/heap'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/c/Users/Nikola/Documents/NetBeansProjects/heap'
make.exe": *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 1s)
I'm running Netbeans on Windows by the way.
Change -std=c++11 to -std=c++0x.