[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: OS X is not (should not be) so different
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 3 Apr 2007 17:48:11 -0300
> You may need to build a .dylib.
>
> gcc -dynamiclib
Actually, I forgot -bundle. This line works:
cc -o random.so -bundle -undefined dynamic_lookup lrandom.o
But, as you suggested, so does
cc -o random.so -dynamiclib -undefined dynamic_lookup lrandom.o
The .so created with the first one is smaller. I don't know whether this means
anything...
Anyway, it seems that using dlopen in Mac OS X 10.4 is ok. Great.
Again, the correct Makefile line for building Lua to use dlopen is
$(MAKE) all MYCFLAGS="-DLUA_USE_LINUX" MYLIBS="-lreadline"
but perhaps LUA_USE_LINUX is confusing... (LUA_USE_LINUX just means
LUA_USE_POSIX, LUA_USE_DLOPEN, and LUA_USE_READLINE).
--lhf