Using libpq - C Library with borland compiler under Windows - Mailing list pgsql-hackers-win32

From tszp@op.pl
Subject Using libpq - C Library with borland compiler under Windows
Date
Msg-id 20050721104053Z1271482-6090+352@kps6.test.onet.pl
Whole thread Raw
List pgsql-hackers-win32
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

pgsql-hackers-win32 by date:

Previous
From: "Jason Long"
Date:
Subject: Re: Manual installation of PostgreSQL 8
Next
From: "Magnus Hagander"
Date:
Subject: Re: 1) Error event produced during 8.0.3 shutdown. 2) Likely wrong interruption time reported in log files (8.0.0 and 8.0.3).