[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: development environment on mac osx
- From: Bertrand Mansion <lua@...>
- Date: Tue, 28 Jul 2009 13:51:25 +0200
On Mon, Jul 27, 2009 at 6:44 PM, Ashish Shrestha<firstname.lastname@example.org> wrote:
> Hi, All.
> Sorry if this is off topic. I currently do all Lua development on a
> remote Arch Linux box. My personal machine is a Mac. Can people who
> have setup a Lua development environment to do Lua and C development
> share how/what their environment is setup?
> What tools do you use? Do you use MacPort? How do you setup to do Lua
> and C together. Do you use luarocks?
I use TextMate with my own Lua bundle (although this one probably
needs some more work):
I compile my modules from the command line. I am not a gcc and C
expert but this is what I use to compile a json module on Leopard for
gcc -Wall -O2 -fno-common -c json_tokener.c -I/opt/local/include
gcc -Wall -O2 -fno-common -c json_lua.c -I/opt/local/include
gcc -Wall -bundle -undefined dynamic_lookup json_lua.o json_tokener.o -o json.so
For the module, see: http://mamasam.indefero.net/p/luajson/
I am not sure my flags are perfect, so feel free to correct them...
My version of Lua is installed in /opt/local because I used MacPorts.
But you don't need Macports as Lua is easy to compile once you have
the developers tools from Apple. Lua usually installs in /usr/local.
I also use LuaRocks for some modules and it usually works fine with