[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Problem linking Lua C module with external library
- From: Daniel Bolgheroni <daniel@...>
- Date: Thu, 9 May 2013 15:38:59 -0300
Hi lua-l@,
What is the right approach to use an external C library when building a
C module to be used with a Lua program?
I'm building a C module to access some GDAL library functions and
linking with Lua. However, when I try to run the Lua program, I get
this:
When I link only with Lua, no problem. However, if I add the GDAL
headers and link it with the external library (in C module), I get the
following error trying to run the Lua program:
lua51: error loading module 'lgdal' from file './lgdal.so':
Cannot load specified object
stack traceback:
[C]: ?
[C]: in function 'require'
./nmodeller.lua:3: in main chunk
[C]: ?
I can understand why Lua can't load this external library, but I don't
have a clue of the best way to do this.
Thank you.