plea for Windows build help - Mailing list pgsql-odbc

From Blaine Simpson
Subject plea for Windows build help
Date
Msg-id 4980A74B.3040602@admc.com
Whole thread Raw
Responses Re: plea for Windows build help  (Shoaib Naazir <je_shoaib@hotmail.com>)
List pgsql-odbc
I'm trying to build the default 32 bit dll on Windows using MS Visual
C++ from the command line.  I have searched this mailing list but found
no discussion of these problems.

I've followed the "COMMAND LINE METHOD" instructions in
win32-compilation.html, except for using the currently available
versions of slproweb's OpenSSL distro and Visual C++ Express.  In an
unsuccessful attempt to avoid complications, I started with the last
bundled source distro, psqlodbc-08.03.0400.tar.gz
<http://wwwmaster.postgresql.org/download/mirrors-ftp/odbc/versions/src/psqlodbc-08.03.0400.tar.gz>.
My PC is running 32 bit Vista.

First, I changed the "afxres.h" reference in psqldb.rc to "windows.h",
since afxres.h does not exist anywhere on my PC, and added

  #ifdef IDC_STATIC
  #undef IDC_STATIC
  #endif
  #define IDC_STATIC (-1)  // all static controls

to psqldb.rc (I guess this constant is probably intended to be set in
afxres.h?).  With these changes, I get all the way to the final link,
whereupon I get

  socket.obj : error LNK2001: unresolved external symbol _getaddrinfo@16
  socket.obj : error LNK2001: unresolved external symbol _freeaddrinfo@4
  socket.obj : error LNK2019: unresolved external symbol
__imp__getnameinfo@28 referenced in function _SOCK_connect_to
.\Release\psqlodbc35w.dll : fatal error LNK1120: 3 unresolved externals

from link.exe.  Internet searches say that these symbols should be
defined in ws2_32.dll, but once again, ws2_32.dll does not exist
anywhere on my PC.  I see that the winsock dll's are present in
\Windows\system32, and I'd think they should be capable of basic address
resolution.

Any tips would be greatly appreciated.

pgsql-odbc by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: Localized error messages, wrong charset
Next
From: Shoaib Naazir
Date:
Subject: Re: plea for Windows build help