Thread: Win32 libpq : Static Link ?

Win32 libpq : Static Link ?

From
Oliver D.
Date:
We are experiencing troubles trying to link -statically- against
libpq.lib on Windows (VC++ 7).

Our app works great when we link against libpq.dll but we can't get the
same result
  with libpq.lib. The app seems to continuously ask for a dll.

We have compiled 7.4.X libpq on Win32 but still can't get a static link.

Have some windows experienced developers already been able to link
against
libpq.lib with VC++ ?

Thank you for your help.

Oliver





Re: Win32 libpq : Static Link ?

From
Oliver D.
Date:
I'm completely stuck with this issue. I just want to know if some Win32
developer has been able to
links statically against libpq (using libpq.lib). Even if I apparently
could compile the static lib, the program
that try to link against still ask for a .dll.

Any help would be appreciated.

Thank you very much.

Oliver.


Le 1 oct. 04, à 23:16, Oliver D. a écrit :

> We are experiencing troubles trying to link -statically- against
> libpq.lib on Windows (VC++ 7).
>
> Our app works great when we link against libpq.dll but we can't get
> the same result
>  with libpq.lib. The app seems to continuously ask for a dll.
>
> We have compiled 7.4.X libpq on Win32 but still can't get a static
> link.
>
> Have some windows experienced developers already been able to link
> against
> libpq.lib with VC++ ?
>
> Thank you for your help.
>
> Oliver


Re: Win32 libpq : Static Link ?

From
"Magnus Hagander"
Date:
I've built with the static libs on MingW, but it's been a while since I did it with MSVC. It's asking specifically for
libpq.dll?Or is it some other DLL? And if libpq, which exports is it looking for? (Use depends.exe from the support
toolsto find out) 

//Magnus

> -----Original Message-----
> From: Oliver D. [mailto:oliver@inadd.com]
> Sent: Monday, October 04, 2004 8:00 AM
> To: pgsql-hackers-win32@postgresql.org
> Subject: Re: [pgsql-hackers-win32] Win32 libpq : Static Link ?
>
> I'm completely stuck with this issue. I just want to know if
> some Win32 developer has been able to links statically
> against libpq (using libpq.lib). Even if I apparently could
> compile the static lib, the program that try to link against
> still ask for a .dll.
>
> Any help would be appreciated.
>
> Thank you very much.
>
> Oliver.
>
>
> Le 1 oct. 04, à 23:16, Oliver D. a écrit :
>
> > We are experiencing troubles trying to link -statically- against
> > libpq.lib on Windows (VC++ 7).
> >
> > Our app works great when we link against libpq.dll but we can't get
> > the same result  with libpq.lib. The app seems to
> continuously ask for
> > a dll.
> >
> > We have compiled 7.4.X libpq on Win32 but still can't get a static
> > link.
> >
> > Have some windows experienced developers already been able to link
> > against libpq.lib with VC++ ?
> >
> > Thank you for your help.
> >
> > Oliver
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html
>
>

Re: Win32 libpq : Static Link ?

From
"Dave Page"
Date:

> -----Original Message-----
> From: pgsql-hackers-win32-owner@postgresql.org
> [mailto:pgsql-hackers-win32-owner@postgresql.org] On Behalf
> Of Oliver D.
> Sent: 04 October 2004 07:00
> To: pgsql-hackers-win32@postgresql.org
> Subject: Re: [pgsql-hackers-win32] Win32 libpq : Static Link ?
>
> I'm completely stuck with this issue. I just want to know if
> some Win32 developer has been able to links statically
> against libpq (using libpq.lib). Even if I apparently could
> compile the static lib, the program that try to link against
> still ask for a .dll.
>
> Any help would be appreciated.

Yes, until a week ago, pgAdmin III linked statically against a VC++
compiled libpq.lib. It sounds to me like the libpq.lib you have is not
actually a static library, but an import library for the DLL.

Regards, Dave

Re: Win32 libpq : Static Link ?

From
Oliver D.
Date:
Le 4 oct. 04, à 09:37, Dave Page a écrit :

> Yes, until a week ago, pgAdmin III linked statically against a VC++
> compiled libpq.lib. It sounds to me like the libpq.lib you have is not
> actually a static library, but an import library for the DLL.
>
> Regards, Dave

Ah, It should explain why my compiled app is so light ;-)
But i've just compiled libpq las friday. So I supposed it was OK.
Is there a way to know if the compiled ?lib is OK ?
Or, much more simple for me, is there a way to get a proper, already
compiled,
libpq.lib ?

Thank you very much.

Oliver


Re: Win32 libpq : Static Link ?

From
"Dave Page"
Date:

> -----Original Message-----
> From: Oliver D. [mailto:oliver@inadd.com]
> Sent: 04 October 2004 09:08
> To: Dave Page
> Cc: pgsql-hackers-win32@postgresql.org
> Subject: Re: [pgsql-hackers-win32] Win32 libpq : Static Link ?
>
>
> Le 4 oct. 04, à 09:37, Dave Page a écrit :
>
> > Yes, until a week ago, pgAdmin III linked statically against a VC++
> > compiled libpq.lib. It sounds to me like the libpq.lib you
> have is not
> > actually a static library, but an import library for the DLL.
> >
> > Regards, Dave
>
> Ah, It should explain why my compiled app is so light ;-) But
> i've just compiled libpq las friday. So I supposed it was OK.
> Is there a way to know if the compiled ?lib is OK ?
> Or, much more simple for me, is there a way to get a proper,
> already compiled, libpq.lib ?

The older 2 files at http://pgadmin.postgresql.org/snapshots/postgresql/ are static iirc. The newest (and smallest) is
certainlydynamic. They are all in MS format. 

Regards, Dave.

Re: Win32 libpq : Static Link ?

From
Oliver D.
Date:
Le 4 oct. 04, à 10:34, Dave Page a écrit :

>> Ah, It should explain why my compiled app is so light ;-) But
>> i've just compiled libpq las friday. So I supposed it was OK.
>> Is there a way to know if the compiled ?lib is OK ?
>> Or, much more simple for me, is there a way to get a proper,
>> already compiled, libpq.lib ?
>
> The older 2 files at
> http://pgadmin.postgresql.org/snapshots/postgresql/ are static iirc.
> The newest (and smallest) is certainly dynamic. They are all in MS
> format.
>
> Regards, Dave.
>

Dave,

Thanks. It solved the issue. I've linked our project to the lib
provided with this release and everything seems to work fine.

Thank you very much.

Oliver.