Building GLFW with VC++ Express

Started by
1 comment, last by tasen 17 years, 6 months ago
Hey all, I've spent the last couple of hours trying to build the GLFW .dll and .lib files with VC++ Express and so far haven't had any luck. I've basically followed Drew_Benton's instructions from this topic: http://www.gamedev.net/community/forums/topic.asp?topic_id=316102 but I still can't get it to work. Here's what I've done: 1. Copied the *.c files/*.h file from glfw/lib to my solution dir 2. Copied the *.c files/*.h file from glfw/lib/win32 to my solution dir 3. Created a new Windows Application DLL 4. Added the files copied from 1. to the project 5. Added GLFW_BUILD_DLL to C/C++ | Preprocessor | Preprocessor Definitions 6. Set the Runtime Library as Multi-threaded Debug DLL 7. Added opengl32.lib and glu32.lib to Linker | Input | Additional Dependencies This compiles fine and I get the glfw.dll and glfw.lib files in the Debug directory, so I copy them over to my test project (http://glfw.sourceforge.net/tutorials/files/lesson01.zip), build the project and nothing happens when I run it. I've #define'd GLFW_DLL before #including glfw.h and I've linked the opengl32, glu32 and glfw libs in the test project too. I tried replacing my dll/lib with the precompiled ones that come in the GLFW package and the test works fine, so I know I'm definately doing something wrong. I've also tried a Release version which doesn't work either. If anyone's managed to compile the GLFW libraries with a VC++ Express project please let me know what I'm doing wrong :D
Advertisement
Dunno, i never had a problem. But i was compiling/linking them statically.
Yep, I tried making the project a Static Library and building it that way, then linking statically with my test project but the test still won't work. I've tried so many different combinations now but I just can't get it right (i.e. not using GLFW_BUILD_DLL, Debug/Release versions etc.) At this stage I haven't had any success with either the static lib or the .dll/.lib combination of GLFW (yeah, I'm using the precompiled libs at the momment, but I'd still like to figure this one out).

Surely I must be missing something simple here. Does anyone else have any ideas?

This topic is closed to new replies.

Advertisement