lua-users home
lua-l archive

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


On Feb 18, 2002 at 04:04 -0300, Luiz Henrique de Figueiredo wrote:
> >Put all the lua source and header files in one directly. This includes
> >lua.c, the library files, the files from the include directly, but NOT the
> >files from luac or the etc. files. In visual C++ make a project in that
> >directory and add all the files to the project. Hit build all. Done.
> 
> This is explained in INSTALL.
> Without moving any files at all, you can do this directly:
> 
>  cc -O2 -o bin/lua -Iinclude -Isrc src/*.c src/lib/*.c src/lua/*.c -lm
> 
> and you get bin/lua but no libraries.
> If you want libraries as well, then do this instead:
> 
>  cd src; cc -O2 -c -I../include *.c; ar rc ../lib/liblua.a *.o
>  cd lib; cc -O2 -c -I../../include *.c; ar rc ../../lib/liblualib.a *.o
>  cd ../lua; cc -O2 -o ../../bin/lua -I../../include *.c ../../lib/*.a -lm
> 
> Similar command lines should work for Windows, if you know how to run your
> compiler in the command line (which I doubt most users do).
> 
> Should this be explained in INSTALL?

Hm, maybe even a build-msvc.bat?  build-borlandc.bat,
build-mingwin.bat, etc.  These could all just be put on the wiki, to
avoid having to maintain them yourself (on the other hand, downloading
a .bat from the wiki is just one more confusing thing for a first-time
user).

-- 
Thatcher Ulrich <tu@tulrich.com>
http://tulrich.com