Re: error while compiling libpq (borland 5.5)

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Vishal Sudheer <vishalsudheer(at)rediffmail(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: error while compiling libpq (borland 5.5)
Date: 2003-11-30 05:54:23
Message-ID: 200311300554.hAU5sNS22112@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces


Please try the attached patch. Thread.c was added late in 7.4
development and it seems no one tested bcc since it was added.

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

Vishal Sudheer wrote:
> Hi,
>
> When I try to create libpq interfaces using Borland 5.5 compiler I am getting
> the following error. The BLIBPQ.LIB is created sucessfully, but when I try
> to link it to my C program I am getting
>
> Error: Unresolved external '_pqGethostbyname' referenced from H:\PG-7.4\POSTGRESQL-7.4\SRC\INTERFACES\LIBPQ\RELEASE\BLIBPQ.LIB|getaddrinfo
>
> Please help
>
> Thank you
>
> Vishal
>
>
> MAKE ERRORS
> -----------
>
>
> MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
> Building the Win32 DLL and Static Library...No configuration specified. Defaulting to Release. bcc32.exe -o".\Release\win32" -If:\Borland\Bcc55\include;..\..\include -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -tWM -a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG .\win32.c
> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
> .\win32.c:
> bcc32.exe -o".\Release\getaddrinfo" -If:\Borland\Bcc55\include;..\..\include -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -tWM -a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG ..\..\port\getaddrinfo.c
> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
> ..\..\port\getaddrinfo.c:
> bcc32.exe -o".\Release\inet_aton" -If:\Borland\Bcc55\include;..\..\include -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -tWM -a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG ..\..\port\inet_aton.c
> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
> ..\..\port\inet_aton.c:
> bcc32.exe -o".\Release\crypt" -If:\Borland\Bcc55\include;..\..\include -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -tWM -a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG ..\..\port\crypt.c
> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
> ..\..\port\crypt.c:
> bcc32.exe -o".\Release\path" -If:\Borland\Bcc55\include;..\..\include -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -tWM -a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG ..\..\port\path.c
> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
> ..\..\port\path.c:
> bcc32.exe -o".\Release\dllist" -If:\Borland\Bcc55\include;..\..\include -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -tWM -a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG ..\..\backend\lib\dllist.c
> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
> ..\..\backend\lib\dllist.c:
> bcc32.exe -o".\Release\md5" -If:\Borland\Bcc55\include;..\..\include -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -tWM -a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG ..\..\backend\libpq\md5.c
> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
> ..\..\backend\libpq\md5.c:
> bcc32.exe -o".\Release\ip" -If:\Borland\Bcc55\include;..\..\include -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -tWM -a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG ..\..\backend\libpq\ip.c
> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
> ..\..\backend\libpq\ip.c:
> bcc32.exe -o".\Release\fe-auth" -If:\Borland\Bcc55\include;..\..\include -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -tWM -a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG .\fe-auth.c
> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
> .\fe-auth.c:
> bcc32.exe -o".\Release\fe-protocol2" -If:\Borland\Bcc55\include;..\..\include -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -tWM -a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG .\fe-protocol2.c
> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
> .\fe-protocol2.c:
> bcc32.exe -o".\Release\fe-protocol3" -If:\Borland\Bcc55\include;..\..\include -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -tWM -a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG .\fe-protocol3.c
> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
> .\fe-protocol3.c:
> bcc32.exe -o".\Release\fe-connect" -If:\Borland\Bcc55\include;..\..\include -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -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:
> Warning W8075 .\fe-connect.c 778: Suspicious pointer conversion in function connectMakeNonblocking
> bcc32.exe -o".\Release\fe-exec" -If:\Borland\Bcc55\include;..\..\include -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -tWM -a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG .\fe-exec.c
> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
> .\fe-exec.c:
> bcc32.exe -o".\Release\fe-lobj" -If:\Borland\Bcc55\include;..\..\include -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -tWM -a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG .\fe-lobj.c
> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
> .\fe-lobj.c:
> bcc32.exe -o".\Release\fe-misc" -If:\Borland\Bcc55\include;..\..\include -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -tWM -a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG .\fe-misc.c
> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
> .\fe-misc.c:
> bcc32.exe -o".\Release\fe-print" -If:\Borland\Bcc55\include;..\..\include -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -tWM -a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG .\fe-print.c
> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
> .\fe-print.c:
> bcc32.exe -o".\Release\fe-secure" -If:\Borland\Bcc55\include;..\..\include -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -tWM -a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG .\fe-secure.c
> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
> .\fe-secure.c:
> bcc32.exe -o".\Release\pqexpbuffer" -If:\Borland\Bcc55\include;..\..\include -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -tWM -a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG .\pqexpbuffer.c
> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
> .\pqexpbuffer.c:
> bcc32.exe -o".\Release\wchar" -If:\Borland\Bcc55\include;..\..\include -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -tWM -a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG ..\..\backend\utils\mb\wchar.c
> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
> ..\..\backend\utils\mb\wchar.c:
> bcc32.exe -o".\Release\encnames" -If:\Borland\Bcc55\include;..\..\include -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -tWM -a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG ..\..\backend\utils\mb\encnames.c
> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
> ..\..\backend\utils\mb\encnames.c:
> tlib.exe ".\Release\blibpq.lib" @MAKE0001.@@@
> TLIB 4.5 Copyright (c) 1987, 1999 Inprise Corporation
> +-".\Release\win32.obj" &
> +-".\Release\getaddrinfo.obj" &
> +-".\Release\inet_aton.obj" &
> +-".\Release\crypt.obj" &
> +-".\Release\path.obj" &
> +-".\Release\dllist.obj" &
> +-".\Release\md5.obj" &
> +-".\Release\ip.obj" &
> +-".\Release\fe-auth.obj" &
> +-".\Release\fe-protocol2.obj" &
> +-".\Release\fe-protocol3.obj" &
> +-".\Release\fe-connect.obj" &
> +-".\Release\fe-exec.obj" &
> +-".\Release\fe-lobj.obj" &
> +-".\Release\fe-misc.obj" &
> +-".\Release\fe-print.obj" &
> +-".\Release\fe-secure.obj" &
> +-".\Release\pqexpbuffer.obj" &
> +-".\Release\wchar.obj" &
> +-".\Release\encnames.obj" &
> +-""
> Warning: 'win32' not found in library
> Warning: 'getaddrinfo' not found in library
> Warning: 'inet_aton' not found in library
> Warning: 'crypt' not found in library
> Warning: 'path' not found in library
> Warning: 'dllist' not found in library
> Warning: 'md5' not found in library
> Warning: 'ip' not found in library
> Warning: 'fe-auth' not found in library
> Warning: 'fe-protocol2' not found in library
> Warning: 'fe-protocol3' not found in library
> Warning: 'fe-connect' not found in library
> Warning: 'fe-exec' not found in library
> Warning: 'fe-lobj' not found in library
> Warning: 'fe-misc' not found in library
> Warning: public '_pqFlush' in module 'fe-misc' clashes with prior module 'fe-exec'
> Warning: 'fe-print' not found in library
> Warning: 'fe-secure' not found in library
> Warning: 'pqexpbuffer' not found in library
> Warning: 'wchar' not found in library
> Warning: 'encnames' not found in library
> Warning: '' not found in library
> Warning: '.OBJ' file not found
> bcc32.exe -o".\Release\libpqdll" -If:\Borland\Bcc55\include;..\..\include -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -tWM -a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG .\libpqdll.c
> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
> .\libpqdll.c:
> brcc32.exe -l 0x409 -if:\Borland\Bcc55\include -fo".\Release\libpq.res" libpq.rc
> Borland Resource Compiler Version 5.40
> Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved.
> ilink32.exe @MAKE0000.@@@
> Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
> Error: Unresolved external '_pqGethostbyname' referenced from H:\PG-7.4\POSTGRESQL-7.4\SRC\INTERFACES\LIBPQ\RELEASE\BLIBPQ.LIB|getaddrinfo
> Error: Unresolved external '_pqStrerror' referenced from H:\PG-7.4\POSTGRESQL-7.4\SRC\INTERFACES\LIBPQ\RELEASE\BLIBPQ.LIB|fe-lobj
>
> ** error 2 ** deleting ".\Release\blibpq.dll"

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 585 bytes

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Peggy Go 2003-11-30 18:59:53 libpq++ ... and kdevelop ... needed packageto get the database working ...
Previous Message Bruce Momjian 2003-11-30 03:34:28 Re: quick ECPG doco change