Thread: PQescapeString and PQescapeBytea not exported during win 32 build

PQescapeString and PQescapeBytea not exported during win 32 build

From
"Rob Butler"
Date:
Hello all,

Simple "bug"

Win 32 builds do not have PQescapeString or PQescapeBytea declared in the
libpqdll.def file.  This causes linking against libpqdll.lib to fail if
either of the functions are called within a program.  Add entries to the def
file for these functions so they are exported during the win 32 build.

Thanks
Rob

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

Re: PQescapeString and PQescapeBytea not exported during win

From
Bruce Momjian
Date:
Attached patch applied.  Let me know if this is incorrect.

---------------------------------------------------------------------------

Rob Butler wrote:
> Hello all,
>
> Simple "bug"
>
> Win 32 builds do not have PQescapeString or PQescapeBytea declared in the
> libpqdll.def file.  This causes linking against libpqdll.lib to fail if
> either of the functions are called within a program.  Add entries to the def
> file for these functions so they are exported during the win 32 build.
>
> Thanks
> Rob
>
> _________________________________________________________________
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
Index: src/interfaces/libpq/libpqdll.def
===================================================================
RCS file: /cvsroot/pgsql/src/interfaces/libpq/libpqdll.def,v
retrieving revision 1.14
diff -c -r1.14 libpqdll.def
*** src/interfaces/libpq/libpqdll.def    6 Sep 2001 02:54:56 -0000    1.14
--- src/interfaces/libpq/libpqdll.def    2 Jun 2002 22:33:03 -0000
***************
*** 88,90 ****
--- 88,92 ----
      PQsetClientEncoding    @ 85
      PQsetnonblocking    @ 86
      PQfreeNotify        @ 87
+     PQescapeString        @ 88
+     PQescapeBytea        @ 89

Re: PQescapeString and PQescapeBytea not exported during win 32 build

From
"Rob Butler"
Date:
I applied the patch, and recompiled postgres, then recompiled my program
using the PQescapeString function.

My program can now compile fine, but any attempt to run it results in the
following error message.

"the ordinal 88 could not be located in the Dynamic Link Library libpq.dll"

Rob



>From: Bruce Momjian <pgman@candle.pha.pa.us>
>To: Rob Butler <rob_butler@hotmail.com>
>CC: pgsql-bugs@postgresql.org
>Subject: Re: [BUGS] PQescapeString and PQescapeBytea not exported during
>win 32 build
>Date: Sun, 2 Jun 2002 18:38:02 -0400 (EDT)
>
>
>Attached patch applied.  Let me know if this is incorrect.
>
>---------------------------------------------------------------------------
>
>Rob Butler wrote:
> > Hello all,
> >
> > Simple "bug"
> >
> > Win 32 builds do not have PQescapeString or PQescapeBytea declared in
>the
> > libpqdll.def file.  This causes linking against libpqdll.lib to fail if
> > either of the functions are called within a program.  Add entries to the
>def
> > file for these functions so they are exported during the win 32 build.
> >
> > Thanks
> > Rob
> >
> > _________________________________________________________________
> > Chat with friends online, try MSN Messenger: http://messenger.msn.com
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 5: Have you checked our extensive FAQ?
> >
> > http://www.postgresql.org/users-lounge/docs/faq.html
> >
>
>--
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman@candle.pha.pa.us               |  (610) 853-3000
>   +  If your life is a hard drive,     |  830 Blythe Avenue
>   +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
>Index: src/interfaces/libpq/libpqdll.def
>===================================================================
>RCS file: /cvsroot/pgsql/src/interfaces/libpq/libpqdll.def,v
>retrieving revision 1.14
>diff -c -r1.14 libpqdll.def
>*** src/interfaces/libpq/libpqdll.def    6 Sep 2001 02:54:56 -0000    1.14
>--- src/interfaces/libpq/libpqdll.def    2 Jun 2002 22:33:03 -0000
>***************
>*** 88,90 ****
>--- 88,92 ----
>       PQsetClientEncoding    @ 85
>       PQsetnonblocking    @ 86
>       PQfreeNotify        @ 87
>+     PQescapeString        @ 88
>+     PQescapeBytea        @ 89


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx

Re: PQescapeString and PQescapeBytea not exported during win

From
Bruce Momjian
Date:
Uh, I think you have to rebuild the libpq win32 library somehow, then
relink your program to it.  However, that *.dll is related somehow.

---------------------------------------------------------------------------

Rob Butler wrote:
> I applied the patch, and recompiled postgres, then recompiled my program
> using the PQescapeString function.
>
> My program can now compile fine, but any attempt to run it results in the
> following error message.
>
> "the ordinal 88 could not be located in the Dynamic Link Library libpq.dll"
>
> Rob
>
>
>
> >From: Bruce Momjian <pgman@candle.pha.pa.us>
> >To: Rob Butler <rob_butler@hotmail.com>
> >CC: pgsql-bugs@postgresql.org
> >Subject: Re: [BUGS] PQescapeString and PQescapeBytea not exported during
> >win 32 build
> >Date: Sun, 2 Jun 2002 18:38:02 -0400 (EDT)
> >
> >
> >Attached patch applied.  Let me know if this is incorrect.
> >
> >---------------------------------------------------------------------------
> >
> >Rob Butler wrote:
> > > Hello all,
> > >
> > > Simple "bug"
> > >
> > > Win 32 builds do not have PQescapeString or PQescapeBytea declared in
> >the
> > > libpqdll.def file.  This causes linking against libpqdll.lib to fail if
> > > either of the functions are called within a program.  Add entries to the
> >def
> > > file for these functions so they are exported during the win 32 build.
> > >
> > > Thanks
> > > Rob
> > >
> > > _________________________________________________________________
> > > Chat with friends online, try MSN Messenger: http://messenger.msn.com
> > >
> > >
> > > ---------------------------(end of broadcast)---------------------------
> > > TIP 5: Have you checked our extensive FAQ?
> > >
> > > http://www.postgresql.org/users-lounge/docs/faq.html
> > >
> >
> >--
> >   Bruce Momjian                        |  http://candle.pha.pa.us
> >   pgman@candle.pha.pa.us               |  (610) 853-3000
> >   +  If your life is a hard drive,     |  830 Blythe Avenue
> >   +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
> >Index: src/interfaces/libpq/libpqdll.def
> >===================================================================
> >RCS file: /cvsroot/pgsql/src/interfaces/libpq/libpqdll.def,v
> >retrieving revision 1.14
> >diff -c -r1.14 libpqdll.def
> >*** src/interfaces/libpq/libpqdll.def    6 Sep 2001 02:54:56 -0000    1.14
> >--- src/interfaces/libpq/libpqdll.def    2 Jun 2002 22:33:03 -0000
> >***************
> >*** 88,90 ****
> >--- 88,92 ----
> >       PQsetClientEncoding    @ 85
> >       PQsetnonblocking    @ 86
> >       PQfreeNotify        @ 87
> >+     PQescapeString        @ 88
> >+     PQescapeBytea        @ 89
>
>
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos:
> http://photos.msn.com/support/worldwide.aspx
>
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026