From: Pinchart, L. <Pin...@PC...> - 2003-06-13 14:50:55
|
> > When building pypgsql with mingw, I get lots of undefined = references at > > linking: > >=20 > > [...] > >=20 > = build\temp.win32-2.2\Release\libpqmodule.o(.text+0x620):libpqmodule.c: > > r=E9f=E9rence > > ind=E9finie vers =AB _imp__PyExc_ValueError =BB > > [...] >=20 > Have you created an import library for mingw like described at=20 > http://www.python.org/doc/current/inst/non-ms-compilers.html#SECTION0003= 1200 0000000000000 ? I hadn't done it. > To build libpq using mingw, get the PostgreSQL 7.3 sources,=20 > unzip them in .. as relative from the pyPgSQL directory, rename the=20 > directory from 'postgresql-7.3.2' or whatever it is to 'postgresql', = then apply the=20 > patch I talked about below http://pypgsql.sourceforge.net/misc/win32_mingw32_makefiles_73.dif=20 > You'll need a 'patch' executable, like the one in Cygwin. >=20 > Then go into the 'postgresql' directory and say >=20 > make -f mingw32.mak >=20 > This will build PostgreSQL's libpq. Shouldn't it be in postgresql/src instead ? I moved mingw32.make to postgresql/src, and did a make -f mingw32.mak. = The built process succeeded (I got errors at link time, but a global make = clean before compiling got rid of them). Building pypgsql using that new libpq.a solved the WSAStartup problem. > Anyway I'll try to look into the MSVC issue on the weekend. I don't know if it's related to the PostgreSQL libpq, or to pyPgSQL libpq.pyd. Laurent Pinchart |