[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lua-l
Subject:    Re: compat-5.1.lua / directory-structure
From:       Tomas <tomas () ccpa ! puc-rio ! br>
Date:       2005-06-30 12:08:59
Message-ID: Pine.LNX.4.62.0506300901070.980 () rpa3 ! vrac ! puc-rio ! br
[Download RAW message or body]

> I managed to install lua50 and compile luasql. I edited compat-5.1.lua
> to include /home/mfritsche/lib/ (for testing purposes) and adjusted the
> environment variable.
 	Adjusted to what value?

> I put libpostgres.2.0.1.so into /home/mfritsche/lib/ - and
> require"luasql.postgres" fails. I linked libpostgresql.2.0.1.so to
> ~/lib/luasql/libpostgresl.so and it still fails...
>
> The question is: how is the directory / filename convention, if I have
> included "~/lib/" in the library path and want to require a package
> "luasql.postgresl"?
 	The call `require"luasql.postgres"' (note, without the 'l' at the
end) will search for the file luasql/postgres.so in your cpath and then
call the function luaopen_luasqlpostgres.  If you change the name of the
file, you'll have to change also the name of the function and recompile it.
If you've just mistyped the name (or can rename it back), the file should
be installed inside the luasql directory.  In your case, I think you'll
have to define package.cpath (LUA_CPATH environment variable) to:

LUA_CPATH=/home/mfritsche/lib/?.so

 	And then copy the binary library to:

/home/mfritsche/lib/luasql/postgres.so

 	Note that it does not have the 'lib' prefix.

 	Regards,
 		Tomas

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic