lua-users home
lua-l archive

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


>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?
--lhf