I’ve been trying to get GLFW to work under Windows 7 using Visual Studio 2010,
but have had no luck so far. I tried using the compiled library on the main
website which did not seem to work, and I’m unable to compile it from command
line (nmake was throwing errors).
I just built the library and all tests and examples on Windows XP using Visual
C++ 2010. Everything seems to be working.
You seem to be using version 2.6. Version 2.7 is nearly done but not released
yet (sorry about that), and is available in the GLFW Subversion repository.
You may have better luck using that.
Under both Win7 and WinXP,
I did manage to compile version 2.6 from source using Visual Studio 2010 Express with no major problems.
Also ran some simple tests putting basic triangles to a window using the
library and also the DLL with no apparent problems, using Visual Studio 2010 Express again.
Have not tried Version 2.7 yet as I am having trouble compiling for X11 under
Linux. (still learning this OS)
This file contains any messages produced by compilers while
running ./compile.sh, to aid debugging if ./compile.sh makes a mistake.
./compile.sh: checking whether we are using GNU C
./compile.sh: cc -E conftest.c
./compile.sh: Checking for X11 RandR support
./compile.sh: gcc -c conftest.c 1>&5
conftest.c:1:22: error: X11/Xlib.h: No such file or directory
conftest.c:2:35: error: X11/extensions/Xrandr.h: No such file or directory
./compile.sh: failed program was:
#include <X11/Xlib.h>
#include <X11/extensions/Xrandr.h>
...........etc
Will look into this a bit closer when I figure out what I am doing.
You don’t need much but the packaging vary from one distribution to another.
For example on slackware if you have X, mesa, and the kernel headers installed
you should be able to built without issue.
On other distro I can’t tell the list of package involved. You need the
development package for the following software:
kernel (headers only)
X11
OpenGL
GLIBC
Am working with Ubuntu 10.04 using the ATI 10.4 FGLRX video driver.
have installed
"libx11-dev"
“libglu1-mesa-dev”
“libgl1-mesa-dev”
Now the 2.7 code appears to compile with no errors.
It may be a good idea if a sticky was created with what support libraries are
required for the various operating systems. It sure would help people like me
(those that don’t know what they are doing).
Will look into it a bit more and if I can not sort it out, then I will start a
new thread just for this problem.
Thanks everyone for your help.
(never thought working under Linux was going to be so hard)
Hi, back to the subject, I have the same problems setting up GLFW on Visual
Studios 2010 in Win7 64.
I had success in compile the GLFW library to use in static mode. But when I
run a single program the glfwInit() returns GLFW_FALSE.
Anyone have any idea why this is happening???
Thanks…
sydbod: If you are using the GLFW build system, it probably didn’t find any
method of retrieving OpenGL extension entry points. If you are building GLFW
with your own build system, you should define the appropriate macro. See
x11_glext.c for details.
Hi, thanks for the fast reply.
I used the debug and the problem is in the line _glfwLibrary.Libs.gdi32 =
LoadLibrary( “gdi32.dll” );
The function LoadLibrary( “gdi32.dll” ) returns NULL, but I don’t know why…
Any ideas???
Thanks again!!!
I will try to go back to windows xp 32 doing the same procedures to see if
works. If works probable is some kind of incompatibility with win7 64… I will
post tomorrow.
Thanks any way…
Hi, I use Windows 7 and Visual Studio 2010. Same as marksibly I need to
complile in Win x64 Unicode configuration. When I changed to x64 there are
more warnings arised, but it’s compiled successfully. When I changed from MBCS
to Unicode a lot of warning in building GLFW.vcproj, but also compiled
successfully. Then I tried to build gears.vcproj. No warning, successfull
build.
I mean is it possible to add Debug x64 and Release x64 in Configuration
manager of GLFW.sln please? I know its hard to control x86 and x64 builds, but
x86 unperspective