lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


	Hi Gilles

On Thu, 14 Apr 2011, Gilles Ganault wrote:

On Thu, 14 Apr 2011 14:25:26 +0200, Gilles Ganault
<gilles.ganault@free.fr> wrote:
src/ls_sqlite3.c:522: error: expected expression before "/" token

Turns out the default setting from CFLAGS is "-ansi", while using //
for comments is only allowed when using "-std=c99".

Compiling and linking went OK, but when trying to load the library
from Lua, I'm getting this error:
===============
/var/tmp> ls -al
-rwxr-xr-x    1 root     root       187262 Apr 14 10:53 lua
-rw-r--r--    1 root     root        41127 Apr 14 13:45 sqlite3.so
===============
/var/tmp> ./lua
./lua
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
require "sqlite3"
error loading module 'sqlite3' from file './sqlite3.so':
 Unable to resolve symbol
===============

FWIW, none of the binaries were stripped. Has someone seen this?
	What symbol could not be resolved?  Was there any other message?
I tried to reproduce your problem (renaming a binary library) and the
message told me what symbol cannot be found:

Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
require"expat" -- the correct way to load luaexpat is require"lxp"
error loading module 'expat' from file './expat.so':
	./expat.so: undefined symbol: luaopen_expat
stack traceback:
	[C]: ?
	[C]: in function 'require'
	stdin:1: in main chunk
	[C]: ?

	Regards,
		Tomás