PDA

View Full Version : Can't get GLFW working at all?



reallyintobooks
08-19-2014, 02:58 PM
Hi! I am having a very frustrating situation with CodeBlocks and GLFW.
I am running Windows 7 64-bit, and using CodeBlocks (which runs 32-bit) with MinGW library.
I downloaded glfw-3.0.4.bin.WIN64 as a zip file, unzipped it, and copied the files as well as I could.
From C:\Users\rib\Desktop\glfw-3.0.4.bin.WIN64\include, I moved glfw3.h and glfw3native.h to C:\Program Files(x86)\CodeBlocks\MinGW\include\GLFW.
From C:\Users\rib\Desktop\glfw-3.0.4.bin.WIN64\lib-mingw, I moved glfw3dll.a and libglfw.a to C:\Program Files(x86)\CodeBlocks\MinGW\lib.
From C:\Users\rib\Desktop\glfw-3.0.4.bin.WIN64\lib-mingw, I moved glfw3.dll to C:\Windows\System32.

I have currently not done anything other than this, and CodeBlocks isn't compiling any GLFW programs.
Please, I need help, because my patience with this is wearing thin.

Ruggero Visitnin
08-19-2014, 05:26 PM
Hi! I am having a very frustrating situation with CodeBlocks and GLFW.
I am running Windows 7 64-bit, and using CodeBlocks (which runs 32-bit) with MinGW library.
I downloaded glfw-3.0.4.bin.WIN64 as a zip file, unzipped it, and copied the files as well as I could.
From C:\Users\rib\Desktop\glfw-3.0.4.bin.WIN64\include, I moved glfw3.h and glfw3native.h to C:\Program Files(x86)\CodeBlocks\MinGW\include\GLFW.
From C:\Users\rib\Desktop\glfw-3.0.4.bin.WIN64\lib-mingw, I moved glfw3dll.a and libglfw.a to C:\Program Files(x86)\CodeBlocks\MinGW\lib.
From C:\Users\rib\Desktop\glfw-3.0.4.bin.WIN64\lib-mingw, I moved glfw3.dll to C:\Windows\System32.

I have currently not done anything other than this, and CodeBlocks isn't compiling any GLFW programs.
Please, I need help, because my patience with this is wearing thin.

i'm not absolutely sure because i work with VisualStudio i had pretty the same problem with glew, the problem is that i was using glew 64 bit (because my windows is a 64 bit based system, of course) but my VisualStudio version was a 32 bit based version.
i want to be clear i don't really know if this is the case but using a 32 bit version i solved my problem, hope it will help you.

Agent D
08-20-2014, 01:31 AM
From C:\Users\rib\Desktop\glfw-3.0.4.bin.WIN64\include, I moved glfw3.h and glfw3native.h to C:\Program Files(x86)\CodeBlocks\MinGW\include\GLFW.
From C:\Users\rib\Desktop\glfw-3.0.4.bin.WIN64\lib-mingw, I moved glfw3dll.a and libglfw.a to C:\Program Files(x86)\CodeBlocks\MinGW\lib.

Don't do this! Create a directory with your dependencies somewhere and point the IDE configuration to the propper directories.


From C:\Users\rib\Desktop\glfw-3.0.4.bin.WIN64\lib-mingw, I moved glfw3.dll to C:\Windows\System32.

Do NOT do this ever! This is Windows(R), not UNIX(R). Dynamic linking libraries go into the same directory as the application binary and are deployed
with the application binary.



I am running Windows 7 64-bit, and using CodeBlocks (which runs 32-bit) with MinGW library.

First of all, MinGW is your toolchain and not a library. Are you using 32 bit MinGW? Are you by any chance trying to link a 64 bit library (GLFW)
against a 32 bit program?



I have currently not done anything other than this, and CodeBlocks isn't compiling any GLFW programs.
Please, I need help, because my patience with this is wearing thin.

Have you literally not done anything else? Have you tried configuring your IDE to link against GLFW?

Have you tried reading the compile log? Also, posting it here and describing what "isn't compiling" means might help a lot.