From: <gh...@gh...> - 2003-06-13 14:00:25
|
Pinchart, Laurent wrote: >>Yes, mingw. I have access to MSVC6 and 7, but don't normally use them >>for open-source projects. > > 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#SECTION000312000000000000000 ? > libpq.a has been built using gcc/cygwin (if there's a way to build it with > mingw please let me know). I'm not experienced with mingw, so any help would > be appreciated. 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. Then you can go into the pyPgSQL directory and build pyPgSQL with python setup.py build --compiler=mingw32 That's the complete process AFAIK. Anyway I'll try to look into the MSVC issue on the weekend. >>I also build my own statically linked libpq using the latest >>PostgreSQL >>sources and my mingw patch for it: >>http://pypgsql.sourceforge.net/misc/postgresql.html Amicalement, -- Gerhard |