ArthurNick / luaforwindows

Automatically exported from code.google.com/p/luaforwindows
0 stars 0 forks source link

LuaSQL missing postgres.dll #44

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I need postgresql support for my project, but upon doing the require, it can't 
find its file. Being prominently listed in the luasql description, you are 
kinda promising it's there.

In the clibs\luasql directory, there are 3 files. 
sqlite3.dll
odbc.dll
mysql.dll

Getting all the requirements to compile it myself has been a pita.

Original issue reported on code.google.com by mahuja...@gmail.com on 3 Jul 2011 at 12:54

GoogleCodeExporter commented 8 years ago
I am having the same problem.  Did you manage to get a postgres dll built?

Original comment by ngrattan...@googlemail.com on 11 Jul 2011 at 2:26

GoogleCodeExporter commented 8 years ago
I need this support soon for an application that I am writing, but I wish there 
was a binary build I could get my hands on. I think there is a LuaRocks in the 
cvs repo so I will try to build that on my test machine and if it goes well I 
will add it to the next release.

Original comment by rpusz...@gmail.com on 11 Jul 2011 at 2:48

GoogleCodeExporter commented 8 years ago

Original comment by rpusz...@gmail.com on 11 Jul 2011 at 4:27

GoogleCodeExporter commented 8 years ago

Original comment by rpusz...@gmail.com on 11 Jul 2011 at 4:28

GoogleCodeExporter commented 8 years ago
The luasql-postgres driver has two dependencies 
- .lib from the lua sources - that should probably correspond to the lua 
version it'll be called by, and I suppose the compiler that will do the final 
compile.
- libpq from postgres sources. This has optional dependencies to e.g. openssl.

Now here's a question: Does the libpq version have to correspond to the 
database version? It tends to give a NOTICE when not matching, but I think 
it'll work right for all the things luasql allows you to do regardless.

If it doesn't, postgres.dll can be statically linked to libpq. If it doesn't, 
building it so the user is required to provide the libpq.dll would be necessary.

Original comment by mahuja...@gmail.com on 17 Jul 2011 at 8:02

GoogleCodeExporter commented 8 years ago
If you feel confident in program files provided by "nobodies" on the net, you 
can use this. Statically linked against libpq for postgres 9.0.4, which was 
(probably) not compiled with any openssl support. (I hope for such support in 
the lfw distribution, though.)

It has not yet been tested further than not giving an error upon connecting.

Original comment by mahuja...@gmail.com on 17 Jul 2011 at 8:09

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for the help. I will look into that as well. Did you use the .rockspec 
to build this?

Original comment by rpusz...@gmail.com on 18 Jul 2011 at 3:45

GoogleCodeExporter commented 8 years ago
Luarocks haven't gotten well along with vc10 for me, though I probably gave it 
up rather early. 

I got the files downloaded, found a vc6 folder with a .dsp I could open in vs10.
A few tweaks were necessary wrt where to find include/lib files from lua and 
postgres, and if you want to make a static compile you need to have the linker 
use 
libpq.lib ws2_32.lib shfolder.lib secur32.lib 
which I don't think are used by default. (libpqdll.lib or so for using extra 
libpq.dll, which won't be found if just put in the same directory as the 
postgres.dll produced.) lua51.lib kinda goes without saying, but I don't know 
if it was there already.

I found nmake to build libpq.lib well using the provided win32.mak. Though I'm 
not sure what it would take to get openssl support from the result.

Original comment by mahuja...@gmail.com on 18 Jul 2011 at 5:02

GoogleCodeExporter commented 8 years ago
I tried the postgres.dll you attached and it relies on the Visual C++ 2010 crt. 
I need a Visual C++ 2005 build, because right now that is the run-time being 
used in LfW. Can you help with that?

Again thanks for you time.

Original comment by rpusz...@gmail.com on 2 Sep 2011 at 7:10