lua-users home
lua-l archive

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


On Thu, Apr 8, 2010 at 12:56 PM, Alexander Gladysh <agladysh@gmail.com> wrote:
>>> gcc -O2 -fpic -c -o lfs.o lfs.c
>>> gcc -O -shared -fpic -undefined dynamic_lookup -o lfs.so lfs.o
>>> sudo cp lfs.so /usr/local/lib/lua/5.1/
>
> You do not build dynamic libraries like this on OS X. :-)

In fact, even I know that!  This is what happens when one doesn't read
closely...

So

MACOSX_DEPLOYMENT_TARGET="10.3"
export MACOSX_DEPLOYMENT_TARGET
gcc -O2 -fno-common -c -o lfs.o lfs.c
gcc -bundle -undefined dynamic_lookup -o lfs.so lfs.o

should actually work?

OS X is a bit of a puzzle to me, because the terminology for shared
libraries is different. Like Windows DLL and Linux .so, they are
indeed diffferent animals that serve the same function.

steve d.