PDA

View Full Version : Building in NetBeans in C++ on Windows 7



stig mann
03-12-2013, 11:08 AM
Hello,
I have not been able to build a simple OpenGL project and would appreciate some suggestions.
My code looks like this:



#include "c:\program files (x86)\Microsoft SDKs\Windows\v7.0a\include\gl\freeglut.h"

int main(int argc, char**argv) {
glutInit(&argc, argv);
return 0;
}


and the complete build output with the 3 things it couldn't find is:

"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/c/Users/Administrator/Documents/NetBeansProjects/Welcome_1'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/welcome_1.exe
make[2]: Entering directory `/c/Users/Administrator/Documents/NetBeansProjects/Welcome_1'
mkdir -p build/Debug/MinGW-Windows
rm -f build/Debug/MinGW-Windows/welcome.o.d
g++ -c -g -I../../../../../Program\ Files\ \(x86\)/Microsoft\ SDKs/Windows/v7.0A/Include/gl -MMD -MP -MF build/Debug/MinGW-Windows/welcome.o.d -o build/Debug/MinGW-Windows/welcome.o welcome.cc
mkdir -p dist/Debug/MinGW-Windows
g++ -o dist/Debug/MinGW-Windows/welcome_1 build/Debug/MinGW-Windows/welcome.o -L\"../../../../../Program\ Files\ \(x86\)/Microsoft\ SDKs/Windows/v7.0A/Lib
build/Debug/MinGW-Windows/welcome.o: In function `glutInit_ATEXIT_HACK':
c:/program files (x86)/Microsoft SDKs/Windows/v7.0a/include/gl//freeglut_std.h:606: undefined reference to `_imp____glutInitWithExit@12'
build/Debug/MinGW-Windows/welcome.o: In function `glutCreateWindow_ATEXIT_HACK':
c:/program files (x86)/Microsoft SDKs/Windows/v7.0a/include/gl//freeglut_std.h:608: undefined reference to `_imp____glutCreateWindowWithExit@8'
build/Debug/MinGW-Windows/welcome.o: In function `glutCreateMenu_ATEXIT_HACK':
c:/program files (x86)/Microsoft SDKs/Windows/v7.0a/include/gl//freeglut_std.h:610: undefined reference to `_imp____glutCreateMenuWithExit@8'
collect2: ld returned 1 exit status
make[2]: *** [dist/Debug/MinGW-Windows/welcome_1.exe] Error 1
make[2]: Leaving directory `/c/Users/Administrator/Documents/NetBeansProjects/Welcome_1'
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory `/c/Users/Administrator/Documents/NetBeansProjects/Welcome_1'
make: *** [.build-impl] Error 2


BUILD FAILED (exit value 2, total time: 2s)

What did I forget to do? Libraries in the wrong place? Properties not set right?

Thanks for your time,
Stig