Problem with porting Lua to other OS/System

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with porting Lua to other OS/System

Nelson Wong
Hi all,

I am currently trying to port Lua to Mac-base system (Console!!),
however, I got following linker errror, where OS specific operations
are not found.

luaz.lib(liolib.c.obj) : error LNK2019: unresolved external symbol
system referenced in function io_execute
luaz.lib(liolib.c.obj) : error LNK2019: unresolved external symbol
getenv referenced in function io_getenv
...

Does anyone has the same experience, or know how to resolve this problem?

Thanks in advance.

Nelson

Reply | Threaded
Open this post in threaded view
|

Re: Problem with porting Lua to other OS/System

Petite Abeille

On Mar 29, 2005, at 05:02, Nelson Wong wrote:

I am currently trying to port Lua to Mac-base system (Console!!),
however, I got following linker errror, where OS specific operations
are not found.

For Lua 5.1, Mike Pall has posted some instructions on how to build C extension modules for Lua:

http://lua-users.org/wiki/BuildingModules

Mac OS X bundles (requires Lua 5.1)
MACOSX_DEPLOYMENT_TARGET="10.3"
export MACOSX_DEPLOYMENT_TARGET
gcc -O2 -fno-common -c -o module.o module.c
gcc -bundle -undefined dynamic_lookup -o module.so module.o

For consistency with other platforms the modules should be installed with the .so extension on Mac OS X, too.

Note: do not strip the dynamic symbols from the Lua executable (use strip -x).

Cheers

--
PA, Onnay Equitursay
http://alt.textdrive.com/


Reply | Threaded
Open this post in threaded view
|

Re: Problem with porting Lua to other OS/System

Asko Kauppi-3
In reply to this post by Nelson Wong

Might it be that the 'system' and 'getenv' functions really are not there?

Like in WinCE devices, there are no environment variables. In this case, you need to make short dummies for them (or comment out the usage in Lua library code).

-ak


29.3.2005 kello 06:02, Nelson Wong kirjoitti:

 Hi all,

I am currently trying to port Lua to Mac-base system (Console!!),
however, I got following linker errror, where OS specific operations
are not found.

luaz.lib(liolib.c.obj) : error LNK2019: unresolved external symbol
system referenced in function io_execute
luaz.lib(liolib.c.obj) : error LNK2019: unresolved external symbol
getenv referenced in function io_getenv
...

Does anyone has the same experience, or know how to resolve this problem?

Thanks in advance.

Nelson



Reply | Threaded
Open this post in threaded view
|

Re: Problem with porting Lua to other OS/System

Nelson Wong
Thanks, Asko,

emmm...but I built the lib at window, which is the same enviorment as pc build.
I do not really prefer to make short dummies for them. BTW, what do
io_execute, and io_getenv do?!
Perhaps, it is for standalone runtime?

Thanks
Nelson


On Tue, 29 Mar 2005 10:07:14 +0300, Asko Kauppi <[hidden email]> wrote:
> 
> Might it be that the 'system' and 'getenv' functions really are not
> there?
> 
> Like in WinCE devices, there are no environment variables.  In this
> case, you need to make short dummies for them (or comment out the usage
> in Lua library code).
> 
> -ak
> 
> 29.3.2005 kello 06:02, Nelson Wong kirjoitti:
> 
>  Hi all,
> >
> > I am currently trying to port Lua to Mac-base system (Console!!),
> > however, I got following linker errror, where OS specific operations
> > are not found.
> >
> > luaz.lib(liolib.c.obj) : error LNK2019: unresolved external symbol
> > system referenced in function io_execute
> > luaz.lib(liolib.c.obj) : error LNK2019: unresolved external symbol
> > getenv referenced in function io_getenv
> > ...
> >
> > Does anyone has the same experience, or know how to resolve this
> > problem?
> >
> > Thanks in advance.
> >
> > Nelson
> >
> 
>

Reply | Threaded
Open this post in threaded view
|

Re: Problem with porting Lua to other OS/System

William Roper
io_execute allows you to execute an os command from lua.
io_getenv I believe looks for the lua environment variables in the
operating system environment.

Neither of these is critical to Lua running properly.

Ryan.


On Tue, 29 Mar 2005 22:03:05 +0900, Nelson Wong <[hidden email]> wrote:
> Thanks, Asko,
> 
> emmm...but I built the lib at window, which is the same enviorment as pc build.
> I do not really prefer to make short dummies for them. BTW, what do
> io_execute, and io_getenv do?!
> Perhaps, it is for standalone runtime?
> 
> Thanks
> Nelson
> 
> 
> On Tue, 29 Mar 2005 10:07:14 +0300, Asko Kauppi <[hidden email]> wrote:
> >
> > Might it be that the 'system' and 'getenv' functions really are not
> > there?
> >
> > Like in WinCE devices, there are no environment variables.  In this
> > case, you need to make short dummies for them (or comment out the usage
> > in Lua library code).
> >
> > -ak
> >
> > 29.3.2005 kello 06:02, Nelson Wong kirjoitti:
> >
> >  Hi all,
> > >
> > > I am currently trying to port Lua to Mac-base system (Console!!),
> > > however, I got following linker errror, where OS specific operations
> > > are not found.
> > >
> > > luaz.lib(liolib.c.obj) : error LNK2019: unresolved external symbol
> > > system referenced in function io_execute
> > > luaz.lib(liolib.c.obj) : error LNK2019: unresolved external symbol
> > > getenv referenced in function io_getenv
> > > ...
> > >
> > > Does anyone has the same experience, or know how to resolve this
> > > problem?
> > >
> > > Thanks in advance.
> > >
> > > Nelson
> > >
> >
> >
>