palito-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [palito-dev] Re: New renderer


From: Tom Barnes-Lawrence
Subject: Re: [palito-dev] Re: New renderer
Date: Sun, 10 Aug 2003 03:54:29 +0100
User-agent: Mutt/1.3.28i

On Sun, Jul 13, 2003 at 08:19:20PM -0200, address@hidden wrote:
> >  -What exact problem Zed has compiling IWR with Lua (and where he has Lua
> >    installed),
> 
> ------------- iwr 0.1 Makefile ----------------------------------------
> INCLUDES=`sdl-config --cflags` -I/usr/local/include
> 
> iwr-shade: iwr-shade.o iwr-texture.o iwr-prog.o
>   gcc -o iwr-shade `sdl-config --libs` -lSDL -L/usr/local/lib \
>     -llua -llualib iwr-shade.o iwr-texture.o iwr-prog.o
> 
  <snip>
> ---------- with lua 4.0 or 4.0.1 --------------------------------------
> gcc -o iwr-shade `sdl-config --libs` -lSDL -L/usr/lib \
>   -llua40 -llualib40 iwr-shade.o iwr-texture.o iwr-prog.o
> iwr-texture.o: In function `iwr_getrgbtexture':
> iwr-texture.o(.text+0x11d): undefined reference to `lua_getglobal'
> iwr-texture.o(.text+0x130): undefined reference to `lua_type'
  <snip, snip...>
> collect2: ld returned 1 exit status
> make: *** [iwr-shade] Error 1

Hi Zed,
The possible reason occurred to me soon after you sent me this, but I've
been busy with other stuff and ended up forgetting. I remembered someone
wrote a book about making games for Linux. Somewhere near the beginning,
it says about how "ld" is picky about the order that object files and
libraries are given to it. And looking at what *I'd* written in my
makefile, I realised that according to what this bloke had said, I'd
put the link order back-to-front. (It works on my machine, but...)

 So, I've already changed the makefile for V0.02, but before I assume
that *was* the problem, can you see if changing it to:

iwr-shade: iwr-shade.o iwr-texture.o iwr-prog.o
[tab]    gcc -o iwr-shade   iwr-shade.o iwr-texture.o iwr-prog.o -llualib40 
-llua40 `sdl-config --libs`


makes any difference. (note that makefiles need the space where I wrote [tab]
to be a tab and *not* spaces, in case you didn't know).

 Tomble




reply via email to

[Prev in Thread] Current Thread [Next in Thread]