[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Compiling bitlib on Mac OS X
- From: "varol kaptan" <varol.kaptan@...>
- Date: Tue, 25 Jul 2006 11:42:45 -0400
I am attaching a makefile (modified from bitlib release 17) which I
use. It creates a bundle and requires OS X 10.4 or later (it requires
no linking to the lua libraries, everything is resolved at loading
time). In order to load it you have to add '?.bundle' to LUA_CPATH and
use require 'bit'. You may have to precede the ? with the whole path
if the library is not in the current directory. Alternatively, you can
rename the bit.bundle to bit.so. The makefile assumes that the lua
include files are
in a standard place (/usr/include or usr/local/include, etc). If not,
then add a line like this
CFLAGS=-Ipath_to_lua_include_files
Varol Kaptan
On 7/25/06, James Edward Gray II <james@grayproductions.net> wrote:
Hello all. I'm brand new to Lua. I read the (first edition)
Programming in Lua a while back, but hadn't found the time to play
with the language much. This weekend though, I ran into a problem my
good friend Ruby just wasn't fast enough to effectively solve. That
got me to give Lua a go.
I have a working solution now, but it's still a little slow. I'm
pretty sure the reason is that I needed bit operations and I just
used LuaBit because it was easy to get working. I've found the
bitlib though and would like to try it.
I tried to figure it out, but I'm just no good at this kind of
thing. I couldn't figure out how to add a compiled bitlib to my Lua
build. Could someone give me some hints?
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?
2. How to load that library once I have made it that far?
Thanks in advance for any tips.
James Edward Gray II
Attachment:
Makefile
Description: Binary data