lists.zerezo.com
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
***BOGO*** Re: [Mingw-users] Trying to port a C Linux library to windows
- Date: Mon, 23 Jun 2008 05:58:09 +0200 (CEST)
- From: Vincent Torri <vtorri@xxxxxxxxxxxx>
- Subject: ***BOGO*** Re: [Mingw-users] Trying to port a C Linux library to windows
On Mon, 23 Jun 2008, JonY wrote:
>>
>> checking libpq-fe.h usability... yes
>> checking libpq-fe.h presence... yes
>> checking for libpq-fe.h... yes
>> checking limits.h usability... yes
>> checking limits.h presence... yes
>> checking for limits.h... yes
>> checking for PQconnectdb in -lpq... no
>> configure: error: postgresql library (libpq) not found
>>
>> And in config.log I can see:
>>
>>
>> configure:28655: checking for PQconnectdb in -lpq
>> configure:28690: gcc -std=gnu99 -o
>> conftest.exe -g -O2 -I/c/PostgreSQL/8.3/include -L/c/PostgreSQL/8.3/lib
>> conftest.c -lpq >&5
>> c:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe:
>> cannot
>> find -lpq
>> collect2: ld returned 1 exit status
>>
>> I don't know exactly how the PostgreSQL library must be named, but "ld"
>> doesn't find what it's looking for.
>>
>> The strange thing is that if I look in c:\PostgreSQL\8.3\lib\ I do have
>> libpq.lib
>
> Try renaming it to "libpq.a".
according to the doc (http://sourceware.org/binutils/docs/ld/WIN32.html),
when using -lfoo, if you have a .lib, it searches foo.lib and not
libfoo.lib. So you can also try to rename libpq.lib to pq.lib
Vincent Torri
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users