Reputation: 83
I have some problems linking to GLFW in Netbeans, I have followed the instructions here:
http://forums.netbeans.org/topic51143.html
I have installed Cygwin and MinGW on my computer, I had since earlier an installation of Cygwin, which I tried to use to compile a GLFW program, but I got the same error, so I decided to try MinGW, as per the instructions, still the same problem. Also, for some reason I can't use msys make.exe as make command, even for compiling a C++ hello world, I have to use the one in Cygwin instead. I have set up windows Path variable to include the locations of both the msys bin directories.
"1) What must be installed (dlls, etc)? glfw.dll libgcc_s_dw2-1.dll libstdc++-6.dll"
I am not sure what this means, does installed in this instance mean that System32/SysWOW64 should contain those mentioned .dlls?
My output for this program (using linker properties as specified here : http://forums.netbeans.org/topic51143.html)
#include <cstdlib>
#include <stdio.h>
#include <GL/glfw.h>
using namespace std;
int main(int argc, char** argv) {
if (!glfwInit())
return -1;
return 0;
}
Yields:
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory /cygdrive/c/Users/sysdba/Documents/NetBeansProjects/GLFW'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW_QT-Windows/glfw.exe
make[2]: Entering directory
/cygdrive/c/Users/sysdba/Documents/NetBeansProjects/GLFW'
mkdir -p build/Debug/MinGW_QT-Windows
rm -f build/Debug/MinGW_QT-Windows/main.o.d
g++.exe -lglfwdll -DGLFW_DLL -c -g -Wall -I../../../Downloads/glfw-2.7.7.bin.WIN64/glfw-2.7.7.bin.WIN64/lib-mingw -MMD -MP -MF build/Debug/MinGW_QT-Windows/main.o.d -o build/Debug/MinGW_QT-Windows/main.o main.cpp
g++: -lglfwdll: linker input file unused because linking not done
mkdir -p dist/Debug/MinGW_QT-Windows
g++.exe -lglfwdll -DGLFW_DLL -o dist/Debug/MinGW_QT-Windows/glfw build/Debug/MinGW_QT-Windows/main.o -L../../../../../MinGW/lib -lglfw -lglu32 -lopengl32 -lglfwdll
nbproject/Makefile-Debug.mk:62: recipe for target dist/Debug/MinGW_QT-Windows/glfw.exe' failed
make[2]: Leaving directory
/cygdrive/c/Users/sysdba/Documents/NetBeansProjects/GLFW'
nbproject/Makefile-Debug.mk:59: recipe for target .build-conf' failed
make[1]: Leaving directory
/cygdrive/c/Users/sysdba/Documents/NetBeansProjects/GLFW'
nbproject/Makefile-impl.mk:39: recipe for target .build-impl' failed
build/Debug/MinGW_QT-Windows/main.o: In function
main':
/cygdrive/c/Users/sysdba/Documents/NetBeansProjects/GLFW/main.cpp:20: undefined reference to `_imp_glfwInit@0'
collect2: ld returned 1 exit status
make[2]: * [dist/Debug/MinGW_QT-Windows/glfw.exe] Error 1
Any idea of what the problem could be? Could it be related to the fact that I am not using the msys make.exe as make command?
Upvotes: 1
Views: 515
Reputation: 83
I fixed my MinGW install, so I could use the make.exe in the MinGW msys, instead of the cygwin mysys, did not help.
Not much of an answer, but it seems to be a problem with GLFW somewhere, could not get it to work. I switched to freeglut, Worked like a charm, without any hassle.
Upvotes: 0