Re: Suggestion for MSVC build

From: "Chuck McDevitt" <cmcdevitt(at)greenplum(dot)com>
To: "Magnus Hagander" <magnus(at)hagander(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Suggestion for MSVC build
Date: 2007-09-25 07:10:41
Message-ID: EB48EBF3B239E948AC1E3F3780CF8F8802A1B52B@MI8NYCMAIL02.Mi8.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The .def files can be generated from cygwin or mingw's dlltool command:

erase readline.def
erase history.def
dlltool --export-all-symbols -z readline.def libreadline.a
dlltool --export-all-symbols -z history.def libhistory.a
lib /machine:i386 /def:readline.def
lib /machine:i386 /def:history.def

(note: dlltool won't overwrite a def file if it exists).

But why would this be necessary? It looks like the readline
distribution is broken.

> -----Original Message-----
> From: Chuck McDevitt
> Sent: Monday, September 24, 2007 11:59 PM
> To: 'Magnus Hagander'
> Cc: 'pgsql-hackers(at)postgresql(dot)org'
> Subject: RE: [HACKERS] Suggestion for MSVC build
>
> Actually, the more I look at it, I realize it was correct before
>
> We want to link against readline.lib and history.lib, but the ones in
> the GnuWin32 distribution are broken.
> The .lib files are made from the .def files, which are supposed to
list
> the exports, but don't.
>
> They can be made from commands like this:
>
> lib /machine:i386 /def:readline.def
> lib /machine:i386 /def:history.def
>
> But that only works if the .def files list the routines you want
> exported.
>
> It's easy enough to add the few we use by hand, but I'm not sure why
> they aren't there.
> Adding them, running those lib commands, allowed me to link with no
> errors or warnings.
>
> Maybe I need to do some research on readline... this seems more
> complicated than I expected.
> Does no one else use readline on Windows? Is the Gnuwin32 readline a
> fraud? I just don't know.
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2007-09-25 07:57:50 proposal casting from XML[] to int[], numeric[], text[]
Previous Message Mark Wong 2007-09-25 07:00:58 top for postgresql (ptop?)