lua-users home
lua-l archive

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


On Tuesday 24 January 2006 21:51, Keith Wiles wrote:
[...]
> I am having a problem compiling Lua 5.1-rc2 under vxWorks for an
> embedded target (the type of target should not matter).

Ooh, VxWorks. I had to deal with that once. I'm sorry.

[...]
> /* vxWorks does not use 'main' in kernel builds (RTPs is another issue),

The problem here is that lua.c isn't really part of the Lua core. The Lua core 
provides the Lua *library*. lua.c is merely an example front-end, which 
provides a simple command-line shell to the Lua language.

It's expected that users implement their own front-end in a way suitable for 
their particular task. For example, games won't use lua.c at all. What I'd do 
in your situation is to take your own copy of lua.c and hack it yourself.

[...]
> In ldo.c and lua.c move the include of "lua.h" (which includes
> luaconf.h) to before the standard includes to allow the vxWorks.h header
> to be included before any standard headers.

Are you sure this is necessary? The Lua core is standard C, and should compile 
on pretty much everything. If VxWorks truly requires vxWorks.h to be included 
before things like stdlib.h will work, then VxWorks is majorly broken.

[...]
> BTW, I am not using the standard Lua makefiles
> as the IDE (Wind River modified Eclipse IDE)

Hurrah! They finally threw away that... er, lovely proprietary IDE they wrote!

-- 
+- David Given --McQ-+ "Of course, on a sufficiently small planet, 40
|  dg@cowlark.com    | km/hr is, in fact, sufficient to punt the elastic
| (dg@tao-group.com) | spherical cow into low orbit." --- Brooks Moses on
+- www.cowlark.com --+ r.a.sf.c

Attachment: pgpie4HmRkVK5.pgp
Description: PGP signature