lua-users home
lua-l archive

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


> For a successful Mac OS X compile, you also have to remove -ldl from 
> this line in config:
> 
> EXTRA_LIBS= -lm
	I've succesfully compiled the new version on
my Mac OS X and didn't had to remove -ldl from that line,
BUT I've installed dlcompat.  Also I want dynamic libraries,
so I changed the Makefile to generate a .dylib:

somac:
    gcc -o lib/liblua.$V.dylib -dynamiclib src/*.o
    gcc -o lib/liblualib.$V.dylib -ldl -dynamiclib src/lib/*.o $(LIB)/liblua.$V.dylib

	(I've changed the names of the libraries too
to have both Lua 5 and 4 versions :-))
	I had to force loadlib at config:

LOADLIB= -DUSE_DLOPEN=1

	And comment MYLDFLAGS as mentioned:

#MYLDFLAGS= -Wl,-E

	And:

make; make somac; make sobin; make soinstallmac

	And I tested all this compiling the new LuaSQL 2.0
version for PostgreSQL using:

require"postgres"

	This loads postgres.lua that checks for loadlib
and dynamically loads libluasqlpostgres.5.0.dylib!
It works :-)

	Tomas