[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Storing Lua code in a C library
- From: Sean Conner <sean@...>
- Date: Sat, 26 May 2012 03:11:21 -0400
It was thus said that the Great Emeka once stated:
> Hello All,
>
> Could someone help me make out why I can't compile the foo.c spitted out by
> Steven lua2c app?
>
> rmicro@ubuntu:~/lua_world$ gcc -O2 -Wall -I/usr/include/lua5.1 -fPIC foo.c
You might want to try the following command line:
% gcc -O2 -Wall -I/usr/include/lua5.1 -shared -fpic -o foo.so foo.c
If the compiler complains about -fpic, only then use -fPIC.
-spc