|
glGetStringi and GL_NUM_EXTENSIONS Errors on Build |
ted_gress
Member #14,404
June 2012
|
Hi everyone, I'm trying to build the iOS allegro frameworks so I can port my allegro game over to iPhone. However, I'm having trouble building the allegro (frameworks) libraries. The issue occurs when I'm calling xcodebuild on the ALLEGRO xcode project in the build folder. It cannot find glGetStringi() or the constant GL_NUM_EXTENSIONS. I've googled/yahooed/ask.com'd them about a billion times and I can't figure out where these identifiers reside. So, basically, I can't compile until I find out what dependencies I'm missing. The error is below: 1
2...
3
4
5iOS/allegro/src/opengl/extensions.c:214:18: error: use of undeclared identifier 'GL_NUM_EXTENSIONS'
6 glGetIntegerv(GL_NUM_EXTENSIONS, &n);
7 ^
8/Users/waltergress/Desktop/iPhone iOS/allegro/src/opengl/extensions.c:216:14: warning: implicit declaration of function 'glGetStringi' is invalid in C99 [-Wimplicit-function-declaration]
9 name = glGetStringi(GL_EXTENSIONS, i);
10 ^
11/Users/waltergress/Desktop/iPhone iOS/allegro/src/opengl/extensions.c:216:12: warning: incompatible integer to pointer conversion assigning to 'const GLubyte *' (aka 'const unsigned char *') from 'int';
12 name = glGetStringi(GL_EXTENSIONS, i);
13 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14/Users/waltergress/Desktop/iPhone iOS/allegro/src/opengl/extensions.c:434:8: warning: unused variable 'v' [-Wunused-variable]
15 int v = al_get_opengl_version();
16 ^
17/Users/waltergress/Desktop/iPhone iOS/allegro/src/opengl/extensions.c:768:28: error: no member named 'GetStringi' in 'struct ALLEGRO_OGL_EXT_API'
18 glGetStringi = ext_api->GetStringi;
19 ~~~~~~~ ^
203 warnings and 2 errors generated.
21
22...
Any help would be greatly appreciated!!! -Ted TwilightRaven Games |
billyquith
Member #13,534
September 2011
|
May be useful? Build from git. My blog. Have you included the iPhone cmake toolchain as in instructions in above links? I normally build Allegro as static libraries as I think everything has to be statically linked on iOS. Try static libraries and see if you get the problem. It is easier anyway. |
ted_gress
Member #14,404
June 2012
|
Yeah I've included the iPhone toolchain in cmake. I'll give your static library idea a try and report back. Thanks (EDIT) I tried going through everything, using your instructions and I'm still getting thanks for the help though.. TwilightRaven Games |
Trent Gamblin
Member #261
April 2000
|
Those are compile errors not link errors. A few tips that might help 1) Use the latest git version of 5.1 NOTE: I just did a full build with all of the addons by manually creating the Xcode project and got it to build without error.
|
ted_gress
Member #14,404
June 2012
|
Trent: Right, sorry. I don't do a lot of work with XCode and couldn't tell whether they were linker errors or compile. ALLEGRO_CFG_OPENGLES is NOT defined in my alplatf.h TwilightRaven Games |
Trent Gamblin
Member #261
April 2000
|
What version of Allegro are you using? If you're up to date and start a clean build directory, using the Toolchain file, it should be set. To quickly test it out just #define ALLEGRO_CFG_OPENGLES 1 in alplatf.h.
|
ted_gress
Member #14,404
June 2012
|
Same issues still present. I added CFG_OPENGLES 1 to alplatf.h but it didn't make a difference. In fact, I rebuilt the whole directory and tried it, still no luck. -Ted TwilightRaven Games |
Thomas Fjellstrom
Member #476
June 2000
|
Are you sure you actually configured the build system to build for iOS rather than OSX? -- |
ted_gress
Member #14,404
June 2012
|
I think so.....this is odd. This is my cmake line: cmake ../ -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-iphone.cmake And after that, I configure the XCode Project, changing these values: * Base SDK (iOS 6.0) TwilightRaven Games |
|