Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Using libpq - C Library with borland compiler under Windows


  • From: tszp(at)op(dot)pl
  • To: pgsql-hackers-win32(at)postgresql(dot)org
  • Subject: Using libpq - C Library with borland compiler under Windows
  • Date: Thu, 21 Jul 2005 12:40:47 +0200
  • Message-id: <20050721104053Z1271482-6090+352(at)kps6(dot)test(dot)onet(dot)pl>

Hi everybody,

I would like to write a program in C processing some data stored in PostgreSQL 8.0 by using the libq under Windows.
Thus I installed the PostgreSQL 8.03 and a free compiler Borland 5.5 C++ compiler .

Now I would like to see if the test program from PostgreSQL named testlibpq.c works.

So I copied from the necessary header files 
from  c:\Program Files\PostgreSQL\8.0\include to c:\Borland\BCC55\Include and
the necessary Lib file(s)
from  c:\Program Files\PostgreSQL\8.0\lib\ms\libpq.lib to c:\Borland\BCC55\Lib

And tried to compile the test program, but always got a message:
Unresolved external ...

Can somebody [knowing Borland C++ compiler] help me in this matter?


If I issue this
C:\Borland\BCC55\Bin>bcc32 testlibpq.c
or this:
C:\Borland\BCC55\Bin>bcc32 -Lc:\borland\bcc55\lib\libpq.lib testlibpq.c
I always get:

Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
testlibpq.c:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external '_PQconnectdb' referenced from C:\BORLAND\BCC55\BIN\T
ESTLIBPQ.OBJ
Error: Unresolved external '_PQstatus' referenced from C:\BORLAND\BCC55\BIN\TEST
LIBPQ.OBJ
Error: Unresolved external '_PQresultStatus' referenced from C:\BORLAND\BCC55\BI
N\TESTLIBPQ.OBJ
Error: Unresolved external '_PQerrorMessage' referenced from C:\BORLAND\BCC55\BI
N\TESTLIBPQ.OBJ
Error: Unresolved external '_PQnfields' referenced from C:\BORLAND\BCC55\BIN\TES
TLIBPQ.OBJ
Error: Unresolved external '_PQfname' referenced from C:\BORLAND\BCC55\BIN\TESTL
IBPQ.OBJ
Error: Unresolved external '_PQgetvalue' referenced from C:\BORLAND\BCC55\BIN\TE
STLIBPQ.OBJ
Error: Unresolved external '_PQntuples' referenced from C:\BORLAND\BCC55\BIN\TES
TLIBPQ.OBJ
Error: Unresolved external '_PQexec' referenced from C:\BORLAND\BCC55\BIN\TESTLI
BPQ.OBJ
Error: Unresolved external '_PQclear' referenced from C:\BORLAND\BCC55\BIN\TESTL
IBPQ.OBJ
Error: Unresolved external '_PQfinish' referenced from C:\BORLAND\BCC55\BIN\TEST
LIBPQ.OBJ

C:\Borland\BCC55\Bin>

Attached Borland config files:


Kind regards,

Tomek

Attachment: bcc32.cfg
Description: Binary data

Attachment: ilink32.cfg
Description: Binary data



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group