Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » SQL_ProgreSQL example building problems
icon5.gif  SQL_ProgreSQL example building problems [message #17601] Fri, 22 August 2008 07:31 Go to next message
xws001 is currently offline  xws001
Messages: 8
Registered: August 2007
Location: Russia
Promising Member
Hi!
I'm try to use U++ 2008.1, and have problems with building SQL_ProgreSQL example.

console output:
>Linking...
>C:\soft\upp\mingw\bin/ld.exe: cannot find -lpq
>collect2: ld returned 1 exit status
>There were errors. (0:11.42)

PostgreSQL ver - 8.3.3
compiler - MinGW

in "Setup \Build methods":
- into tab "INCLUDE directories" added "C:\Progra~1\Postgr~1\8.3\include"
- into tab "LIB directories" added "C:\Progra~1\Postgr~1\8.3\lib"

Can you help me?

[Updated on: Fri, 22 August 2008 09:56]

Report message to a moderator

Re: SQL_ProgreSQL example building problems [message #17610 is a reply to message #17601] Fri, 22 August 2008 13:57 Go to previous messageGo to next message
captainc is currently offline  captainc
Messages: 278
Registered: December 2006
Location: New Jersey, USA
Experienced Member
it will be looking for a file called pq.lib, where is this file located on your computer?
Re: SQL_ProgreSQL example building problems [message #17662 is a reply to message #17601] Mon, 25 August 2008 04:15 Go to previous messageGo to next message
xws001 is currently offline  xws001
Messages: 8
Registered: August 2007
Location: Russia
Promising Member
On my computer is no file named "pq.lib".
But exists file "libpq.lib" (C:\Program Files\PostgreSQL\8.3\lib).

[Updated on: Mon, 25 August 2008 04:16]

Report message to a moderator

Re: SQL_ProgreSQL example building problems [message #17665 is a reply to message #17662] Mon, 25 August 2008 11:16 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Насколько я помню, MinGW требует не lib, а .a файлы. Искать соответственно надо pq.a.

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

As far as I know MinGW uses .a, not .lib libraries. Is there pq.a on your computer?
Re: SQL_ProgreSQL example building problems [message #17671 is a reply to message #17601] Mon, 25 August 2008 12:45 Go to previous messageGo to next message
xws001 is currently offline  xws001
Messages: 8
Registered: August 2007
Location: Russia
Promising Member
No any "*.a" file into PostgreSQL folders Sad
and no any "pg.*" file in C: drive
Re: SQL_ProgreSQL example building problems [message #17672 is a reply to message #17671] Mon, 25 August 2008 14:11 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
You have to specify
-llibpq
instead, this should work.

See also
http://www.mingw.org/wiki/FAQ

Matthias
Re: SQL_ProgreSQL example building problems [message #17689 is a reply to message #17601] Tue, 26 August 2008 04:30 Go to previous messageGo to next message
xws001 is currently offline  xws001
Messages: 8
Registered: August 2007
Location: Russia
Promising Member
>Linking...
> C:\soft\upp\out\MINGW.Debug.Debug_full.Gui\SQL_PostgreSql.ex e (13812817 B) linked in (0:26.75)

Thanks!

I'm fix line
"library(WIN32 !NOPOSTGRESQL GCC) pq;"
to
"library(WIN32 !NOPOSTGRESQL GCC) libpq;"
inside "PostgreSQL.upp"
Is it a bug!?

P.S. As I think is no way to specify "-llibpq" param for compiler directly.
Re: SQL_ProgreSQL example building problems [message #17690 is a reply to message #17689] Tue, 26 August 2008 05:02 Go to previous messageGo to next message
captainc is currently offline  captainc
Messages: 278
Registered: December 2006
Location: New Jersey, USA
Experienced Member
There are similar issues with other libraries as well; such as openssl and some other plugins. Binaries are installed in different directory structures than self-builds and self-compiled build methods can create different library names. These slight adjustments are unfortunately usually necessary. Though, you are right in that linking with mingw or on linux, you do not specify the lib name with extension -> pq.lib, but rather you specify lib[libname] -> libpq.

[Updated on: Tue, 26 August 2008 05:06]

Report message to a moderator

Re: SQL_ProgreSQL example building problems [message #17758 is a reply to message #17690] Thu, 28 August 2008 08:58 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
captainc wrote on Mon, 25 August 2008 23:02

There are similar issues with other libraries as well; such as openssl and some other plugins. Binaries are installed in different directory structures than self-builds and self-compiled build methods can create different library names. These slight adjustments are unfortunately usually necessary. Though, you are right in that linking with mingw or on linux, you do not specify the lib name with extension -> pq.lib, but rather you specify lib[libname] -> libpq.


Well, I am thinking that maybe, in fact, we could ship some of them with Win32 release (AFAIK, both pg or ssl are BSD).

Mirek
Re: SQL_ProgreSQL example building problems [message #17763 is a reply to message #17758] Thu, 28 August 2008 09:42 Go to previous message
captainc is currently offline  captainc
Messages: 278
Registered: December 2006
Location: New Jersey, USA
Experienced Member
Quote:

Well, I am thinking that maybe, in fact, we could ship some of them with Win32 release (AFAIK, both pg or ssl are BSD).

I think it's a good idea. Maybe provide a second download package with all the compiled libs included. Then, if someone wants to update their libs, they can just replace the ones already included in the package.
Previous Topic: SQLCommander make program crash
Next Topic: U++ SQL Begginer
Goto Forum:
  


Current Time: Fri Mar 29 10:19:14 CET 2024

Total time taken to generate the page: 0.01924 seconds