Using libpq - C Library with borland compiler under Windows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Using libpq - C Library with borland compiler under Windows

tszp
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



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

bcc32.cfg (92 bytes) Download Attachment
ilink32.cfg (54 bytes) Download Attachment