<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>glGetStringi and GL_NUM_EXTENSIONS Errors on Build</title>
		<link>http://www.allegro.cc/forums/view/611728</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Fri, 11 Jan 2013 01:33:53 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hi everyone,</p><p>I&#39;m trying to build the iOS allegro frameworks so I can port my allegro game over to iPhone. However, I&#39;m having trouble building the allegro (frameworks) libraries. The issue occurs when I&#39;m calling xcodebuild on the ALLEGRO xcode project in the build folder.</p><p>It cannot find glGetStringi() or the constant GL_NUM_EXTENSIONS. I&#39;ve googled/yahooed/ask.com&#39;d them about a billion times and I can&#39;t figure out where these identifiers reside. So, basically, I can&#39;t compile until I find out what dependencies I&#39;m missing. The error is below:</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">  1</span>
<span class="number">  2</span>...
<span class="number">  3</span>
<span class="number">  4</span>
<span class="number">  5</span>iOS<span class="k3">/</span>allegro<span class="k3">/</span>src<span class="k3">/</span>opengl<span class="k3">/</span>extensions.c:214:18: error: use of undeclared identifier <span class="s">'GL_NUM_EXTENSIONS'</span>
<span class="number">  6</span>   glGetIntegerv<span class="k2">(</span>GL_NUM_EXTENSIONS, <span class="k3">&amp;</span>n<span class="k2">)</span><span class="k2">;</span>
<span class="number">  7</span>                 ^
<span class="number">  8</span><span class="k3">/</span>Users<span class="k3">/</span>waltergress<span class="k3">/</span>Desktop<span class="k3">/</span>iPhone iOS<span class="k3">/</span>allegro<span class="k3">/</span>src<span class="k3">/</span>opengl<span class="k3">/</span>extensions.c:216:14: warning: implicit declaration of function <span class="s">'glGetStringi'</span> is invalid in C99 <span class="k2">[</span><span class="k3">-</span>Wimplicit-function-declaration<span class="k2">]</span>
<span class="number">  9</span>      name <span class="k3">=</span> glGetStringi<span class="k2">(</span>GL_EXTENSIONS, i<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 10</span>             ^
<span class="number"> 11</span><span class="k3">/</span>Users<span class="k3">/</span>waltergress<span class="k3">/</span>Desktop<span class="k3">/</span>iPhone iOS<span class="k3">/</span>allegro<span class="k3">/</span>src<span class="k3">/</span>opengl<span class="k3">/</span>extensions.c:216:12: warning: incompatible integer to pointer conversion assigning to <span class="s">'const GLubyte *'</span> <span class="k2">(</span>aka <span class="s">'const unsigned char *'</span><span class="k2">)</span> from <span class="s">'int'</span><span class="k2">;</span> 
<span class="number"> 12</span>      name <span class="k3">=</span> glGetStringi<span class="k2">(</span>GL_EXTENSIONS, i<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 13</span>           ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<span class="number"> 14</span><span class="k3">/</span>Users<span class="k3">/</span>waltergress<span class="k3">/</span>Desktop<span class="k3">/</span>iPhone iOS<span class="k3">/</span>allegro<span class="k3">/</span>src<span class="k3">/</span>opengl<span class="k3">/</span>extensions.c:434:8: warning: unused variable <span class="s">'v'</span> <span class="k2">[</span><span class="k3">-</span>Wunused-variable<span class="k2">]</span>
<span class="number"> 15</span>   <span class="k1">int</span> v <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_get_opengl_version"><span class="a">al_get_opengl_version</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 16</span>       ^
<span class="number"> 17</span><span class="k3">/</span>Users<span class="k3">/</span>waltergress<span class="k3">/</span>Desktop<span class="k3">/</span>iPhone iOS<span class="k3">/</span>allegro<span class="k3">/</span>src<span class="k3">/</span>opengl<span class="k3">/</span>extensions.c:768:28: error: no member named <span class="s">'GetStringi'</span> in <span class="s">'struct ALLEGRO_OGL_EXT_API'</span>
<span class="number"> 18</span>   glGetStringi <span class="k3">=</span> ext_api-&gt;GetStringi<span class="k2">;</span>
<span class="number"> 19</span>                  ~~~~~~~  ^
<span class="number"> 20</span><span class="n">3</span> warnings <span class="k1">and</span> <span class="n">2</span> errors generated.
<span class="number"> 21</span>
<span class="number"> 22</span>...
</div></div><p>

Any help would be greatly appreciated!!!</p><p>-Ted
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ted_gress)</author>
		<pubDate>Mon, 31 Dec 2012 08:37:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>May be useful? <a href="http://wiki.allegro.cc/index.php?title=Install_Allegro5_From_Git">Build from git</a>. <a href="http://chinbilly.blogspot.co.uk/2011/07/notes-on-using-allegro-5-on-mac.html">My blog</a>.</p><p>Have you included the iPhone cmake toolchain as in instructions in above links?</p><p>I normally build Allegro as static libraries as I think everything <i>has</i> to be statically linked on iOS. Try static libraries and see if you get the problem. It is easier anyway.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (billyquith)</author>
		<pubDate>Mon, 31 Dec 2012 23:36:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yeah I&#39;ve included the iPhone toolchain in cmake. I&#39;ll give your static library idea a try and report back.</p><p>Thanks</p><p>(EDIT)</p><p>I tried going through everything, using your instructions and I&#39;m still getting<br />the same linker error for the GL functions getStringi and the constant GL_NUM_EXTENSIONS..</p><p>thanks for the help though..
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ted_gress)</author>
		<pubDate>Tue, 01 Jan 2013 01:06:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Those are compile errors not link errors. A few tips that might help <img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" /></p><p>1) Use the latest git version of 5.1<br />2) Make sure ALLEGRO_CFG_OPENGLES is defined in your alplatf.h<br />3) Compile with Xcode not Xcodebuild. CMake doesn&#39;t fully support iOS building so some things have to be tweaked within Xcode.</p><p>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.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Trent Gamblin)</author>
		<pubDate>Sun, 06 Jan 2013 14:40:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Trent: </p><p>Right, sorry. I don&#39;t do a lot of work with XCode and couldn&#39;t tell whether they were linker errors or compile.</p><p>ALLEGRO_CFG_OPENGLES is <b>NOT</b> defined in my alplatf.h <br />So I am assuming that is the problem. Is there a way to remedy this?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ted_gress)</author>
		<pubDate>Mon, 07 Jan 2013 01:49:22 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>What version of Allegro are you using? If you&#39;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.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Trent Gamblin)</author>
		<pubDate>Mon, 07 Jan 2013 02:39:48 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Same issues still present.</p><p>I added CFG_OPENGLES 1 to alplatf.h but it didn&#39;t make a difference. In fact, I rebuilt the whole directory and tried it, still no luck.<br />The code is the newest branch off of the svn.</p><p>-Ted
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ted_gress)</author>
		<pubDate>Thu, 10 Jan 2013 09:28:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Are you sure you actually configured the build system to build for iOS rather than OSX?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Thu, 10 Jan 2013 18:53:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I think so.....this is odd.</p><p>This is my cmake line:</p><p>cmake ../ -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-iphone.cmake  <br />-DWANT_FRAMEWORKS=1  -DSHARED=0 -G Xcode</p><p>And after that, I configure the XCode Project, changing these values:</p><p> * Base SDK (iOS 6.0)<br />  * Architectures  (armv7, armv7s)<br />  * Code Signing Identity (iPhone Developer)<br />  * Targeted Device Family <br />  * Supported Platforms: iOS<br /> <br />Is there anything I&#39;m missing??
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ted_gress)</author>
		<pubDate>Fri, 11 Jan 2013 01:33:53 +0000</pubDate>
	</item>
</rss>
