[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Link Problem on Windows
From: |
Martyn Russell |
Subject: |
Link Problem on Windows |
Date: |
Thu, 02 Jun 2005 16:13:00 +0100 |
Hi,
I am currently having problems linking in libpq (Postgres client front
end) from PostgreSQL 8.0.2. I downloaded the source and installed it
under MSYS/MinGW (to /usr/local). The .dll and the .a are
in /usr/local/pgsql/lib.
I have tried using
-L/usr/local/pgsql/lib -lpq
but it fails miserably, I get the following:
*** Warning: linker path does not have real file for library -lpq.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libpq and none of the candidates passed a file format test
*** using a file magic. Last file checked: C:/msys/1.0/local/pgsql/lib/libpq.dll
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.
*** Since this library must not contain undefined symbols,
*** because either the platform does not support them or
*** it was explicitly requested with -no-undefined,
*** libtool will only create a static version of it.
I saw this when trying to link with the Winsock2 library (-lws2_32)
before now and decided to try and update libtool from 1.4.x to 1.5.18.
It worked perfectly especially now I make use of the automatic
import/export feature in gcc, however, this doesn't work for libpq?
I have tried hacking around libtool and it seems to think the file
format is "unknown" instead of "x86 DLL", however other DLLs which I
have build with -lws2_32 seem to say the same and link fine?
I think the reason it drops the -lpq is because it comes back as
"unknown" and so can't tell if the library is static or dynamic, etc.
The only other detail I have noticed about libpq.dll is that the file
format is pe-i386 and my libraries and the Winsock2 library is of format
pei-i386. Does this have an impact on my problem?
This should be easier than this to get going, so what am I doing wrong?
--
Regards,
Martyn
- Link Problem on Windows,
Martyn Russell <=