Python PostgreSQL frontend for Win2K with MinGW32 ?

Discussion in 'Python' started by Dave Haynes, Aug 27, 2003.

  1. Dave Haynes

    Dave Haynes Guest

    Hi,

    This is just as much a PostgreSQL question as a Python one, but here
    goes...

    I've been trying to port the psycopg interface to a Win2K client
    (server runs FreeBSD). I'm using MinGW32 rather than CygWin, and having
    trouble compiling the libpg library as a DLL.

    I started off with the following:

    configure --with-template=win --without-zlib
    make -C src/interfaces install

    After complaints that I was missing "Makefile.port" I took
    a copy from Makefile.win.

    My Win2K/MSYS/MinGW32 setup doesn't have netinet/in.h, ioctl.h, inet.h,
    or arpa.h, so I removed the #includes to these header files in
    pg_config.h. I sort of assumed that none of these would be needed, and I
    would end up linking to the Windows socket library instead of all the
    Unix stuff. Massive overoptimism replaced by confusion and gloom.

    The dlltool can't find a lot of the socket call targets, fe-connect.c
    and fe-misc.c being the main offenders.

    Can anyone help, please? I know there are some psycopg enthusiasts
    about; I'd be very grateful for some pointers. I'd rather use MinGW32
    than CygWin; I could swap but my understanding was that MinGW has all
    that's required.

    Alternatively, are there any VC++ Studio binaries available? Not that
    I approve of course ;-)

    Cheers,


    Dave
    Dave Haynes, Aug 27, 2003
    #1
    1. Advertising

  2. In article <>, Dave Haynes wrote:

    > I've been trying to port the psycopg interface to a Win2K client
    > (server runs FreeBSD). I'm using MinGW32 rather than CygWin, and having
    > trouble compiling the libpg library as a DLL.


    Have you tried any of these?

    http://www.stickpeople.com/projects/python/psycopg/

    There are also pyPgSQL win32 binaries at http://pypgsql.sf.net

    Dave Cook
    David M. Cook, Aug 27, 2003
    #2
    1. Advertising

  3. Dave Haynes wrote:
    > Hi,
    >
    > This is just as much a PostgreSQL question as a Python one, but here
    > goes...
    >
    > I've been trying to port the psycopg interface to a Win2K client
    > (server runs FreeBSD). I'm using MinGW32 rather than CygWin, and having
    > trouble compiling the libpg library as a DLL. [...]


    I'd recommend you statically link in libpq into your Python PostgreSQL
    interface. That's what I'm doing for the win32 releases of pyPgSQL. I'm
    also, like you, using mingw for these and I use this patch I created
    many moons ago:

    http://pypgsql.sourceforge.net/misc/postgresql.html

    HTH,

    -- Gerhard
    =?ISO-8859-1?Q?Gerhard_H=E4ring?=, Aug 28, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. orion30

    MSYS / MINGW32 / PYTHON / SWIG

    orion30, Jun 24, 2003, in forum: Python
    Replies:
    1
    Views:
    2,309
  2. C. Barnes
    Replies:
    2
    Views:
    1,943
    Roger Binns
    May 20, 2004
  3. Laszlo Nagy
    Replies:
    0
    Views:
    564
    Laszlo Nagy
    Sep 21, 2009
  4. David Robinow
    Replies:
    0
    Views:
    440
    David Robinow
    Sep 20, 2009
  5. Laszlo Nagy
    Replies:
    1
    Views:
    459
    Paul Rudin
    Sep 21, 2009
Loading...

Share This Page