lua-users home
lua-l archive

Re: Compiling bitlib on Mac OS X

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


On Jul 25, 2006, at 16:48, James Edward Gray II wrote:
I'm on Mac OS X and have compiled Lua 5.1. I need to know:
1. How do I compile bitlib so Lua will be able to load it?
Here is what I do:
% gcc -O2 -fno-common -c -o lbitlib.o lbitlib.c
% gcc -bundle -undefined dynamic_lookup -o bit.so lbitlib.o
More info under 'Building Modules: Mac OS X bundles':
http://lua-users.org/wiki/BuildingModules
2. How to load that library once I have made it that far?
Copy the 'bit.so' somewhere in 'package.cpath':
./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so
Feel free to adjust the 'cpath' to your likening:
package.cpath = package.cpath .. ";./Library/Modules/?.so"
Cheers,
PA.

AltStyle によって変換されたページ (->オリジナル) /