Has anyone put Lua on a Pocket PC?

Started by
4 comments, last by Jedive 19 years, 3 months ago
Like the questions says, has anyone put a Lua build under Pocket PC? Using embedded C++? (not interested in VB projects) I'm interested in this, and would like to hear from people who have been able to compile it, thank you.
Advertisement
First, I'll have to admit that I've never done this.
However I can't imagine that you'd have any problems. Lua is written in highly portable C which should compile just fine on any post-ANSI compiler, even in C++ mode.
You shouldn't have to do more than add the sources to your project, no need to bother with libraries.

Quote:lua.org/about
Lua is implemented as a small library of C functions, written in ANSI C, and compiles unmodified in all known platforms.

If it's more than a five minute job you could always return to this thread with some specifics.
I get a lot of problems in lauxlib.h, regarding:
char buffer[LUAL_BUFFERSIZE];

Quote:
C:\Projects\Prometheus\lua\src\lauxlib.h(99) : error C2065: 'BUFSIZ' : undeclared identifier
C:\Projects\Prometheus\lua\src\lauxlib.h(99) : error C2057: expected constant expression
C:\Projects\Prometheus\lua\src\ltests.c(29) : fatal error C1083: Cannot open include file: 'lualib.h': No such file or directory
lua.c
C:\Projects\Prometheus\lua\src\lauxlib.h(99) : error C2065: 'BUFSIZ' : undeclared identifier
C:\Projects\Prometheus\lua\src\lauxlib.h(99) : error C2057: expected constant expression
C:\Projects\Prometheus\lua\src\lua.c(18) : fatal error C1083: Cannot open include file: 'lualib.h': No such file or directory


...and also signal.h...

I'm compiling for the PocketPC... i have no idea where that header (signal.h) is...

[Edited by - Prozak on January 10, 2005 8:34:07 AM]
Forget those errors...

I'm geting a lot of unresoveds on the generated Lib...

Is it true that embeded Visual C++ might not be fully ANSI compliant, as Lua is, and that that might be the source of my problems?

Thanks for any pointers on this... its being dificult to get it to work out...
Quote:Original post by Prozak
I'm getting a lot of unresoveds on the generated Lib...
Maybe you could post those errors too?
I think you might have an easier time simply dumping the Lua sources in your source tree instead of linking it in as an external library.
Quote:Original post by Prozak
Is it true that embeded Visual C++ might not be fully ANSI compliant, as Lua is, and that that might be the source of my problems?
I still doubt that's the problem. I don't think any (serious) non C89 compliant compiler has been released in the last decade or so.
I have sucessfully compiled Lua for the GamePark32 handheld console with some minor changes. I guess that the problems you will find are similar to the ones I found in GP32 GCC. For example, all the printf() stuff was giving me errors, as GP32 does not have a 'standard output'. I simply commented these lines (so Lua became 'quiet' reporting errors).

The problem was that the compiler was not fully compliant, but you can easily deal with it. For example, about the undefined BUFSIZ symbol, just look for it on msdn, so you can see in which .h file of Visual C++ it is defined. Then, simply replace that constant in Lua with the real value it has. I had to do it with some other constants, too.

This topic is closed to new replies.

Advertisement