[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: compat-5.1.lua / directory-structure
- From: Tomas <tomas@...>
- Date: Thu, 30 Jun 2005 09:08:59 -0300 (BRT)
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
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
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:
And then copy the binary library to:
Note that it does not have the 'lib' prefix.