issue building unofficial opengl sdk
I'm trying to build the unofficial opengl sdk (glsdk.sourceforge.net), and I'm running into this issue. I'm not sure if I'm missing some dependency but I've no idea what config.h is. I just unzipped the glsdk to the directory and ran these commands:
C:\MinGW\include\glsdk_0.4.0>premake4 gmake
'sh' is not recognized as an internal or external command,
operable program or batch file.
Building configurations...
Running action 'gmake'...
Generating Makefile...
Generating glload/Makefile...
Generating glimg/Makefile...
Generating glfw/Makefile...
Generating freeglut/Makefile...
Generating glutil/Makefile...
Generating glmesh/Makefile...
Done.
C:\MinGW\include\glsdk_0.4.0>mingw32-make config=debug
"==== Building glload (debug) ===="
Creating lib
Creating Debug
gll_c.c
gll_gl_ext.c
gll_cpp.cpp
wgll_ext.c
Linking glload
"==== Building glimg (debug) ===="
Creating lib
Creating Debug
DdsLoader.cpp
ImageCreator.cpp
ImageFormat.cpp
ImageSet.cpp
ImageSetImpl.cpp
StbLoader.cpp
TestLoader.cpp
TextureGenerator.cpp
Util.cpp
stb_image.c
Linking glimg
"==== Building glfw (debug) ===="
Creating library
Creating obj/Debug
enable.c
fullscreen.c
glext.c
image.c
init.c
input.c
joystick.c
stream.c
lib/stream.c:31:0: warning: "_CRT_SECURE_NO_WARNINGS" redefined [enabled by defa
ult]
<command-line>:0:0: note: this is the location of the previous definition
tga.c
thread.c
time.c
window.c
win32_dllmain.c
win32_enable.c
win32_fullscreen.c
win32_glext.c
win32_init.c
win32_joystick.c
win32_thread.c
win32_time.c
win32_window.c
Linking glfw
"==== Building freeglut (debug) ===="
Creating lib
Creating obj/Debug
freeglut_callbacks.c
In file included from src/freeglut_callbacks.c:29:0:
src/freeglut_internal.h:32:24: fatal error: config.h: No such file or directory
compilation terminated.
mingw32-make[1]: *** [obj/Debug/freeglut_callbacks.o] Error 1
mingw32-make: *** [freeglut] Error 2
C:\MinGW\include\glsdk_0.4.0>
Re: issue building unofficial opengl sdk
I just realized the premake did not succeed since it used the 'sh' command while I'm on windows. Should I have used a flag besides gmake?
Re: issue building unofficial opengl sdk
The Premake4 gmake build is designed for the standard GNU tools. So you should be using it only on Linux or other systems where those tools have been installed.
If you're using Windows, I would suggest using Code::Blocks or Visual Studio.
Re: issue building unofficial opengl sdk
PLEASE DISREGARD -- I didn't notice your tutorials come with glsdk and I'm to simply build them in place, not get glsdk myself. I'll keep the rest of the post here in case it's ever useful to some googler somewhere. (I'm still not sure why it couldn't load glloadD.lib when I had manually put my own copy of glsdk in the classpath and built it though)
I'm actually trying to build your tutorial projects. I've switched to vs2010 as suggested and get this error (after running 'premake4 vs2010' and then attempting to build in vs2010):
---
Unable to start program
'...\framework\lib\framework.lib'.
The specified file is an unrecognized or unsupported binary format.
---
Not sure what to make of this. Any advice?
Edit: I thought perhaps there were some left over files from when I ran 'premake4 gmake' & 'mingw32-make', so I used a fresh directory and got this error:
1>------ Build started: Project: framework, Configuration: Debug Win32 ------
1> Timer.cpp
1> Scene.cpp
1> Mesh.cpp
1> framework.cpp
1> Generating Code...
1> framework.vcxproj -> C:\Projects\Tutorial 0.3.8\framework\lib\frameworkD.lib
2>------ Build started: Project: Tut 01 Main, Configuration: Debug Win32 ------
2> tut1.cpp
2>LINK : fatal error LNK1104: cannot open file 'glloadD.lib'
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I have glsdk in my class path so I'm not entirely sure why vs2010 can't find glloadD.lib -- do I have to add each sub-directory to the classpath? I'm not entirely sure which gui option lets me add glsdk as a dependency.
Re: issue building unofficial opengl sdk
Classpath? This is C++, not Java.
In any case, the error suggests that you didn't build the SDK. The tutorials come with it, but you still have to build it. That's why the instructions tell you to build it ;)
Re: issue building unofficial opengl sdk
Quote:
Originally Posted by Alfonse Reinheart
Classpath? This is C++, not Java.
In any case, the error suggests that you didn't build the SDK. The tutorials come with it, but you still have to
build it. That's why
the instructions tell you to build it ;)
Yes I had built the glsdk that I had manually unpacked, but I didn't know how to change vs2010's include path (I guessed windows classpath).
Once I saw the glsdk included with your tutorial I built it, and I presume your premake script handled the rest.
Thanks for the timely replies though, look forward to reading your tutorial.