[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Memory allocation error in lpeg v0.9
- From: "Thomas Harning Jr." <harningt@...>
- Date: Wed, 4 Aug 2010 09:32:57 -0400
On Wed, Aug 4, 2010 at 9:20 AM, Cedric Mauclair
<cedric.mauclair@gmail.com> wrote:
> In my libs directory, I have a liblua.a (which is a static library if
> I understand correctly). I used the following to compile LPeg library:
>
> gcc -Wall -Wextra -pedantic -Waggregate-return -Wbad-function-cast
> -Wcast-align -Wcast-qual -Wdeclaration-after-statement
> -Wdisabled-optimization -Wmissing-prototypes -Wnested-externs
> -Wpointer-arith -Wshadow -Wsign-compare -Wstrict-prototypes -Wundef
> -Wwrite-strings -O2 -DNDEBUG -ansi -I/opt/include -c -o lpeg.o
> lpeg.c
>
> gcc -shared -L/opt/lib -llua lpeg.o -o lpeg.so
You need to use
gcc -bundle -undefined dynamic_lookup -o lpeg.so lpeg.o
for Mac OSX to safely work. The -undefined dynamic_lookup makes it
search the namespace of the current process for undefined symbols.
--
Thomas Harning Jr.