RE: Re: Can't connect using Win95 client

"Pinchart, Laurent" <[email protected]> Fri, 13 Jun 2003 16:47:43 +0200
Newsgroups gmane.comp.python.db.pypgsql.user
Message-ID <[email protected]>
> > When building pypgsql with mingw, I get lots of undefined references at
> > linking:
> > 
> > [...]
> > 
> build\temp.win32-2.2\Release\libpqmodule.o(.text+0x620):libpqmodule.c:
> > référence
> >  indéfinie vers « _imp__PyExc_ValueError »
> > [...]
> 
> Have you created an import library for mingw like described at 
>
http://www.python.org/doc/current/inst/non-ms-compilers.html#SECTION00031200
0000000000000 ?

I hadn't done it.

> To build libpq using mingw, get the PostgreSQL 7.3 sources, 
> unzip them in .. as relative from the pyPgSQL directory, rename the 
> directory from  'postgresql-7.3.2' or whatever it is to 'postgresql', then
apply the 
> patch I talked about below
http://pypgsql.sourceforge.net/misc/win32_mingw32_makefiles_73.dif 
> You'll need a 'patch' executable, like the one in Cygwin.
> 
> Then go into the 'postgresql' directory and say
> 
> make -f mingw32.mak
> 
> 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


-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5