lua-users home
lua-l archive

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


Chris,

Nice to know there are some other Mac + Lua people out there!

Of course, true to form: as soon as you get super frustrated at post an
"About to give up on Lua!" message, you clear your head and are able to dig
deeper and discover the problem:

All the c std routintes (fopen, fputs, etc) were not defined since I really
never use those routines...

So once I realized that much, it was just a matter of rooting through and
replacing/removing those calls (or the entire routine they are in).  At this
point "dofile" isn't important to our product, etc...

What gets my goat is that although the computer may be over 50 years old and
has come a vastly long way, error reporting still SUCKS!  OK, so the code is
calling fputs which isn't defined: so you report that GetToolTrapAddress
isn't defined!?!?!

Argh....

Anyway, I'm a much happier camper now that I can move forward.

Thanks for your help,
Ando

> I have Lua working in an OS X app.  Rather than build a shared library I just
> incorporated the Lua sources.   Use the sources for Lua and the libraries, but
> don't use [luac]/luac.c  or [lua]/lua.c, as those are for building the
> standalone or the compiler.
> 
> I'm using CodeWarrior as well, and it runs like a champ.
> 
> Hope this helps,
> 
> Chris Perkins
> Media Lab, Inc.
> 
> 
> 
> 
> At 10:59 AM 7/29/2003, Ando Sonenblick wrote:
>> Gang,
>> 
>> This may be a longshot, since I'm working on a Mac and am encountering what
>> I assume is a mac specific problem, but it never hurts to ask:
>> 
>> I am trying simply to embed lua in my C++ app but I am finding one show
>> stopper:
>> 
>> Situation:
>> 
>> Mac OSX 10.2.6
>> CodeWarrior IDE 5.1.1
>> Totally extern "C"-ified all the .h includes
>> 
>> And this problem happens if I directly include all the source in my project
>> or If I build lua as a standard library and include it.
>> 
>> First, I can get main lua to work fine.  But once I want to open up
>> libararies (any) by adding, say, luaopen_base(L); then I get this link
>> error:
>> 
>> "undefined 'GetToolTrapAddress' (code)
>> Referenced from '__system7present' in MSL_C_PPC.Lib"
>> 
>> Having poked around a bit it all hinges on the declaration of the open call:
>> 
>> LUALIB_API int luaopen_base (lua_State *L);
>> 
>> With that declaration, I get the link error above.  If I comment it out,
>> that link error disappears and naturally I get another link error saying
>> that luaopen_base is undefined...
>> 
>> Does anyone have ANY thoughts on this?  I don't care if I have to extract
>> lua code and put it in my own files, etc.. Anything to get this to work.
>> 
>> And I've been trying for two entire days now to fully embed Lua and haven't
>> been able to....  Thiiiiiiiis close to considering Pythong or Ruby or
>> something else...  Because we have a schedule to maintain!
>> 
>> Thanks,
>> Ando
>> 
>> 
>> -----------------
>> SpriTec Software
>> www.spritec.com
> 

-----------------
SpriTec Software
www.spritec.com