<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Compiling</title>
		<link>https://luagl.wikidot.com/forum/t-34714/compiling</link>
		<description>Posts in the discussion thread &quot;Compiling&quot;</description>
				<copyright></copyright>
		<lastBuildDate>Wed, 07 Oct 2026 21:21:17 +0000</lastBuildDate>
		
					<item>
				<guid>http://luagl.wikidot.com/forum/t-34714#post-371663</guid>
				<title>Re: Compiling</title>
				<link>https://luagl.wikidot.com/forum/t-34714/compiling#post-371663</link>
				<description></description>
				<pubDate>Sat, 31 Jan 2009 11:12:19 +0000</pubDate>
								<wikidot:authorUserId>28310</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Good to see somebody hasn't given up on this.<br /> Now all I am waiting for is a new version getting support for OpenGL 3.0 :)</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-34714#post-371512</guid>
				<title>Re: Compiling</title>
				<link>https://luagl.wikidot.com/forum/t-34714/compiling#post-371512</link>
				<description></description>
				<pubDate>Sat, 31 Jan 2009 03:45:09 +0000</pubDate>
				<wikidot:authorName>alvaro martínez</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>after some googleing and errors i managed to build with my following makefile (only for osx, <tt>luarocks</tt> doesnt build <tt>LuaGL</tt> because it doesnt give the <tt>-frameworks</tt> parameters to <tt>gcc</tt>)<br /> But i still get some memory runtime errors</p> <div class="code"></div> <br /> CC = export MACOSX_DEPLOYMENT_TARGET=10.3;gcc<br /> LD = export MACOSX_DEPLOYMENT_TARGET=10.3;gcc<br /> FrameWorks = -F/System/Library/Frameworks/<br /> INC = -I/usr/include/ -I/usr/local/include/ $(FrameWorks) -Iinclude<br /> LIB = $(FrameWorks) -framework OpenGL -framework GLUT -L/usr/lib/ -lgmalloc -L/usr/local/lib/ -llua5.1<br /> CFLAGS = -pedantic -fno-common -Wall -fPIC $(INC)<br /> LFLAGS = $(LIB) -bundle -undefined dynamic_lookup -all_load <p>all: LibGL LibGlut</p> <p>clean:<br /> rm *.o *.so</p> <p>%.o: src/%.c<br /> $(CC) $(CFLAGS) -c $&lt; -o $@</p> <p>LibGL: LuaGL.o<br /> $(LD) $(LFLAGS) -o luagl.so LuaGL.o</p> <p>LibGlut: LuaGlut.o<br /> $(LD) $(LFLAGS) -o luaglut.so LuaGlut.o</p> <p>[[/code]]</p> <p>In the file <tt>luagl.c</tt> says:</p> <div class="code"> <pre><code>#include &lt;malloc.h&gt;</code></pre></div> <p>it doesnt work in mac osx (because doesnt come with it), its better to change it to:</p> <div class="code"> <pre><code>#include &lt;stdio.h&gt;</code></pre></div> <p>that seems to be the main problem at runtime because it keeps telling me the following error:</p> <p><tt>lua(19956,0xa000ed88) malloc: *** Deallocation of a pointer not malloced: 0x84c28;</tt></p> <p>anyone has an idea?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-34714#post-365249</guid>
				<title>Re: Compiling</title>
				<link>https://luagl.wikidot.com/forum/t-34714/compiling#post-365249</link>
				<description></description>
				<pubDate>Sat, 24 Jan 2009 09:08:33 +0000</pubDate>
				<wikidot:authorName>alvaro martínez</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>could you post the makefile?<br /> i am also a os x user, but this doesn't compile via luarocks</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-34714#post-281263</guid>
				<title>Re: Compiling</title>
				<link>https://luagl.wikidot.com/forum/t-34714/compiling#post-281263</link>
				<description></description>
				<pubDate>Sun, 12 Oct 2008 03:33:53 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi, it's funny because it's been so long since I've used this. I never did see your reply :)</p> <p>Thanks for the info. I did end up getting it to work.</p> <p>Cheers</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-34714#post-90931</guid>
				<title>Re: Compiling</title>
				<link>https://luagl.wikidot.com/forum/t-34714/compiling#post-90931</link>
				<description></description>
				<pubDate>Mon, 14 Jan 2008 04:17:04 +0000</pubDate>
				<wikidot:authorName>fabiowguerra</wikidot:authorName>				<wikidot:authorUserId>9823</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi Scott,</p> <p>I do not have experience with OS X.</p> <p>But if you are just extending an OpenGL application, you can simply include LuaGL.c in your project and add LuaGL headers to your include path, that should work.</p> <p>If you need to use glut, you can create a dynamic library, linking LuaGL.c and LuaGlut.c (and LuaGlu.c and LuaGLAux.c, if using the SVN version). The dependencies are on Lua, OpenGL, GLU and GLUT.</p> <p>I'm using the following makefile on linux, but I think it is not very portable. I'm accepting suggestion on how to build a more portable makefile&#8230;</p> <blockquote> <p>CC = gcc<br /> LD = ld<br /> INC = -Iinclude -Isrc -I/usr/include/lua5.1<br /> LIB = -lGLU -lGL -lm -llua5.1<br /> CFLAGS = -Wall -fPIC -c $(INC)<br /> LFLAGS = $(LIB)<br /> LGLUT = -lglut</p> <p>all: luagl luaglu luaglut</p> <p>luagl: LibLuaGL<br /> luaglu: LibLuaGlu<br /> luaglut: LibLuaGlut</p> <p>clean:<br /> rm *.o *.so</p> <p>LuaGLAux.o: src/LuaGLAux.c<br /> $(CC) $^ $(CFLAGS) -o $@</p> <p>LuaGL.o: src/LuaGL.c<br /> $(CC) $^ $(CFLAGS) -o $@</p> <p>LuaGlu.o: src/LuaGlu.c<br /> $(CC) $^ $(CFLAGS) -o $@</p> <p>LuaGlut.o: src/LuaGlut.c<br /> $(CC) $^ $(CFLAGS) -o $@</p> <p>LibLuaGL: LuaGL.o LuaGLAux.o<br /> $(LD) $(LFLAGS) -shared -o LuaGL.so LuaGL.o LuaGLAux.o</p> <p>LibLuaGlu: LuaGlu.o LuaGLAux.o<br /> $(LD) $(LFLAGS) -shared -o LuaGlu.so LuaGlu.o LuaGLAux.o</p> <p>LibLuaGlut: LuaGlut.o<br /> $(LD) $(LFLAGS) $(LGLUT) -shared -o LuaGlut.so LuaGlut.o</p> </blockquote> <p>Hope this helped you.</p> <p>Fabio</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-34714#post-90566</guid>
				<title>Re: Compiling</title>
				<link>https://luagl.wikidot.com/forum/t-34714/compiling#post-90566</link>
				<description></description>
				<pubDate>Sun, 13 Jan 2008 02:41:59 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Any news on this? If there's no Makefile can anybody give me a bit of a hint for compiling with gcc on OS X?</p> <p>Cheers,<br /> Scott</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-34714#post-89846</guid>
				<title>Re: Compiling</title>
				<link>https://luagl.wikidot.com/forum/t-34714/compiling#post-89846</link>
				<description></description>
				<pubDate>Fri, 11 Jan 2008 04:10:21 +0000</pubDate>
				<wikidot:authorName>fabiowguerra</wikidot:authorName>				<wikidot:authorUserId>9823</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>It is not a dead project, since there are big changes on the svn. But it really needs a better documentation and makefile to be more usefull to a lot of people.</p> <p>Fabio</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://luagl.wikidot.com/forum/t-34714#post-89533</guid>
				<title>Compiling</title>
				<link>https://luagl.wikidot.com/forum/t-34714/compiling#post-89533</link>
				<description></description>
				<pubDate>Thu, 10 Jan 2008 15:01:13 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>I have no idea where to start, since there are no tutorials or anything. :( Or maybe this is a dead project?</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>