lua-users home
lua-l archive

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


On 22 Dec 2002, at 20:18, Ignacio Castaño wrote:

> David wrote:
> 
> > Any C compiler, or just VC?
> >
> > I've got the free Borland 5.5 compiler, and only got Lua 4 to compile
> after a
> > lot of ugly hacking. Mind you, I'm an idiot when it comes to
> > makefiles,
> but
> > unless you happen to have a supported compiler,
> 
> Try with mingw it's also free and you only have to add -D__NO_ISOCEXT to
> the definitions and type 'make'.
> 

Ignacio:

Unlike David, I'm 100% idiot when it comes to compiling C source (not 
only makefiles). :(

This way, I choose to make a build.bat changing some names and slashes 
to fit MinGW and Windows. This is what I used (wrapped lines were 
indented):

-<begin>---------------------------------------------------------------
@echo off
echo Building bin\lua:
D:\MinGW\bin\gcc -O2 -o bin\lua -Iinclude -Isrc src\*.c src\lib\*.c 
        src\lua\*.c -lm
echo Building Lua libraries and executables:
cd src
D:\MinGW\bin\gcc -O2 -c -I..\include *.c
D:\MinGW\bin\ar rc ..\lib\liblua.a *.o
cd lib
D:\MinGW\bin\gcc -O2 -c -I..\..\include *.c
D:\MinGW\bin\ar rc ..\..\lib\liblualib.a *.o
cd ..\lua
D:\MinGW\bin\gcc -O2 -o ..\..\bin\lua -I..\..\include *.c ..\..\lib\*.a
        -lm
cd ..\luac
D:\MinGW\bin\gcc -O2 -o ..\..\bin\luac -I..\..\include -I.. *.c 
        -DLUA_OPNAMES ..\lopcodes.c ..\..\lib\*.a
---------------------------------------------------------------< end >-

Everything went fine except that I got warnings on last command line:

print.c:9:1: warning: "LUA_OPNAMES" redefined
print.c:1:1: warning: this is the location of previous definition

Note that I didn't use "-D__NO_ISOCEXT" as you recommended. And now, 
the dumb question: where am I supposed to put it on the build.bat 
above? ;)

Binaries built worked ok on all \test tests so I'm using it as it came 
out. I built an Win32 installation with Windows binaries, sources and 
docs. If anyone have interest on it just let me know. I uploaded it to 
my always unfinished Internet page for public download. Beware of slow 
download (though it's only ~950K).

http://www.bssolutions.hpg.com.br/filepacks/Setup_Lua.exe

Kind regards,

-- Euler


-- Season's Greetings to All!! -- Have a Great New Year!!