Using libpq 8.4 with PostgreSQL 9.1

Поиск
Список
Период
Сортировка
Искать

Using libpq 8.4 with PostgreSQL 9.1

От:
"lmanorders" <lmanorders@gmail.com>
Дата:
I can't compile the libpq source code that came with ver 9.1 with Borlands C++ Compiler (bcc32.exe). I get lots of errors. I can compile the libpq source code that came with ver 8.4. Can I link my programs with ver 8.4 libpq.dll and run them with ver 9.1 of the postgreSQL server? Thanks, Lynn

Re: Using libpq 8.4 with PostgreSQL 9.1

От:
Bruce Momjian <bruce@momjian.us>
Дата:
On Fri, Feb 10, 2012 at 03:29:29PM -0700, lmanorders wrote:
> I can't compile the libpq source code that came with ver 9.1 with Borlands C++
> Compiler (bcc32.exe). I get lots of errors. I can compile the libpq source code
> that came with ver 8.4. Can I link my programs with ver 8.4 libpq.dll and run
> them with ver 9.1 of the postgreSQL server? Thanks, Lynn

Uh, not sure.  Can you show us the errors so we can fix the compile?

-- 
  Bruce Momjian          http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

Re: Using libpq 8.4 with PostgreSQL 9.1

От:
"lmanorders" <lmanorders@gmail.com>
Дата:
Hi Bruce,

I attempted to compile libpq with two different versions of the Borland 
(Embarcadero) bcc32 compiler.

The free version of bcc32.exe (ver 5.5.1) produces the following output:

MAKE Version 5.2  Copyright (c) 1987, 2000 Borland
Building the Win32 DLL and Static Library...
Configuration "Release"
 bcc32.exe -I..\..\include\port\win32_msvc;c:\Borland\bcc55\include;..\..\include;..\..\include\port\win32;..\..\port 
 -n".\Release" -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS -tWM   -a8 -X -w-use  
-w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG fe-connect.c
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
fe-connect.c:
Error E2451 fe-connect.c 1283: Undefined symbol 'intptr_t' in function 
connectDBStart
Error E2293 fe-connect.c 1283: ) expected in function connectDBStart
Error E2451 fe-connect.c 2669: Undefined symbol 'intptr_t' in function 
makeEmptyPGconn
Error E2293 fe-connect.c 2669: ) expected in function makeEmptyPGconn
*** 4 errors in Compile ***

** error 1 ** deleting ".\Release\fe-connect.obj"
--------------------------------------

The latest version of the bcc32.exe (ver 6.40) which ships with C++ Builder 
XE2 produces the following output:

MAKE Version 5.4  Copyright (c) 1987, 2010 Embarcadero Technologies, Inc.
Building the Win32 DLL and Static Library...
Configuration "Release"
 bcc32.exe -I..\..\include\port\win32_msvc;c:\bcbxe2\9.0\include;..\..\include;..\..\include\port\win32;..\..\port 
 -n".\Release" -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS -tWM   -a8 -X -w-use  
-w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG fe-connect.c
Embarcadero C++ 6.40 for Win32 Copyright (c) 1993-2011 Embarcadero 
Technologies, Inc.
fe-connect.c:
Error E2238 ..\..\include\pg_config_os.h 373: Multiple declaration for 
'ssize_t'
Error E2344 C:\bcbxe2\9.0\include\windows\crtl\_stddef.h 45: Earlier 
declaration of 'ssize_t'
Error E2238 ..\..\include\getaddrinfo.h 115: Multiple declaration for 
'addrinfo'
Error E2344 C:\bcbxe2\9.0\include\windows\sdk\ws2def.h 841: Earlier 
declaration of 'addrinfo'
Error E2238 ..\..\include\libpq/pqcomm.h 45: Multiple declaration for 
'sockaddr_storage'
Error E2344 C:\bcbxe2\9.0\include\windows\sdk\ws2def.h 287: Earlier 
declaration of 'sockaddr_storage'
Error E2268 C:\bcbxe2\9.0\include\windows\sdk\mstcpip.h 589: Call to 
undefined function 'Address' in function Ipv4UnicastAddressScope
Warning W8070 C:\bcbxe2\9.0\include\windows\sdk\mstcpip.h 599: Function 
should return a value in function Ipv4UnicastAddressScope
Error E2268 C:\bcbxe2\9.0\include\windows\sdk\mstcpip.h 629: Call to 
undefined function 'Address' in function Ipv4MulticastAddressScope
Warning W8070 C:\bcbxe2\9.0\include\windows\sdk\mstcpip.h 643: Function 
should return a value in function Ipv4MulticastAddressScope
Error E2268 C:\bcbxe2\9.0\include\windows\sdk\mstcpip.h 991: Call to 
undefined function 'Address' in function Ipv6UnicastAddressScope
Warning W8070 C:\bcbxe2\9.0\include\windows\sdk\mstcpip.h 1004: Function 
should return a value in function Ipv6UnicastAddressScope
Warning W8070 C:\bcbxe2\9.0\include\windows\sdk\mstcpip.h 1089: Function 
should return a value in function Ipv6AddressType
Error E2451 fe-connect.c 1021: Undefined symbol 'ss_stuff' in function 
connectFailureMessage
Error E2451 fe-connect.c 1030: Undefined symbol 'ss_stuff' in function 
connectFailureMessage
Error E2451 fe-connect.c 3127: Undefined symbol 'ss_stuff' in function 
internal_cancel
*** 12 errors in Compile ***

** error 2 ** deleting ".\Release\fe-connect.obj"
----------------------------

Thanks for checking this out,
Lynn


----- Original Message ----- 
From: "Bruce Momjian" 
To: "lmanorders" 
Cc: 
Sent: Tuesday, February 14, 2012 2:23 PM
Subject: Re: [NOVICE] Using libpq 8.4 with PostgreSQL 9.1


> On Fri, Feb 10, 2012 at 03:29:29PM -0700, lmanorders wrote:
>> I can't compile the libpq source code that came with ver 9.1 with 
>> Borlands C++
>> Compiler (bcc32.exe). I get lots of errors. I can compile the libpq 
>> source code
>> that came with ver 8.4. Can I link my programs with ver 8.4 libpq.dll and 
>> run
>> them with ver 9.1 of the postgreSQL server? Thanks, Lynn
>
> Uh, not sure.  Can you show us the errors so we can fix the compile?
>
> -- 
>  Bruce Momjian          http://momjian.us
>  EnterpriseDB                             http://enterprisedb.com
>
>  + It's impossible for everything to be true. +
> 

FAQ