plea for Windows build help

plea for Windows build help

am 28.01.2009 19:43:23 von Blaine Simpson

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
.
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.

--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: plea for Windows build help

am 28.01.2009 22:57:10 von Shoaib Naazir

--_ae159c7d-7171-4b82-a05b-762cd27c9474_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable


Blain=2C
=20
I dont know why afxres.h is not present on your system. It should be the pa=
rt of the distro or vc install but you can fix the link errors by adding
ws2_32.lib in your library references. The dll is not used by the linker :)=
..
=20
Shoaib.
Artificial intelligence is no match for natural stupidity!!
=20
> Date: Wed=2C 28 Jan 2009 13:43:23 -0500> From: blaine.simpson@admc.com> T=
o: pgsql-odbc@postgresql.org> Subject: [ODBC] plea for Windows build help> =
> 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 di=
scussion of these problems.> > I've followed the "COMMAND LINE METHOD" inst=
ructions in> win32-compilation.html=2C except for using the currently avail=
able> versions of slproweb's OpenSSL distro and Visual C++ Express. In an> =
unsuccessful attempt to avoid complications=2C I started with the last> bun=
dled source distro=2C psqlodbc-08.03.0400.tar.gz> sql.org/download/mirrors-ftp/odbc/versions/src/psqlodbc-08.0 3.0400.tar.gz>.=
> My PC is running 32 bit Vista.> > First=2C I changed the "afxres.h" refe=
rence in psqldb.rc to "windows.h"=2C> since afxres.h does not exist anywher=
e on my PC=2C and added> > #ifdef IDC_STATIC> #undef IDC_STATIC> #endif> #d=
efine 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=
=2C I get all the way to the final link=2C> whereupon I get> > socket.obj :=
error LNK2001: unresolved external symbol _getaddrinfo@16> socket.obj : er=
ror LNK2001: unresolved external symbol _freeaddrinfo@4> socket.obj : error=
LNK2019: unresolved external symbol> __imp__getnameinfo@28 referenced in f=
unction _SOCK_connect_to> .\Release\psqlodbc35w.dll : fatal error LNK1120: =
3 unresolved externals> > from link.exe. Internet searches say that these s=
ymbols should be> defined in ws2_32.dll=2C but once again=2C ws2_32.dll doe=
s not exist> anywhere on my PC. I see that the winsock dll's are present in=
> \Windows\system32=2C and I'd think they should be capable of basic addres=
s> resolution.> > Any tips would be greatly appreciated.> > -- > Sent via p=
gsql-odbc mailing list (pgsql-odbc@postgresql.org)> To make changes to your=
subscription:> http://www.postgresql.org/mailpref/pgsql-odbc
____________________________________________________________ _____
Windows Live=99: E-mail. Chat. Share. Get more ways to connect.=20
http://windowslive.com/explore?ocid=3DTXT_TAGLM_WL_t2_allup_ explore_012009=

--_ae159c7d-7171-4b82-a05b-762cd27c9474_
Content-Type: text/html; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable






Blain=2C

 =3B

I dont know why afxres.h is not present on your system. It should be the pa=
rt of the distro or vc install but you can fix the link errors by adding >
ws2_32.lib in your library references. The dll is not used by the linker :)=
..

 =3B

Shoaib.


Artificial intelligence is no match for natural stupidity!! TRONG>

 =3B

3D"Beta adge 2" src=3D"http://www.windowslive-hotmail.com/betathanks/downloa d/image=
s/download_2.jpg" border=3D0>




>=3B Date: We=
d=2C 28 Jan 2009 13:43:23 -0500
>=3B From: blaine.simpson@admc.com
=
>=3B To: pgsql-odbc@postgresql.org
>=3B Subject: [ODBC] plea for Win=
dows build help
>=3B
>=3B I'm trying to build the default 32 bit=
dll on Windows using MS Visual
>=3B C++ from the command line. I have=
searched this mailing list but found
>=3B no discussion of these prob=
lems.
>=3B
>=3B I've followed the "COMMAND LINE METHOD" instruct=
ions in
>=3B win32-compilation.html=2C except for using the currently =
available
>=3B versions of slproweb's OpenSSL distro and Visual C++ Ex=
press. In an
>=3B unsuccessful attempt to avoid complications=2C I sta=
rted with the last
>=3B bundled source distro=2C psqlodbc-08.03.0400.t=
ar.gz
>=3B <=3Bhttp://wwwmaster.postgresql.org/download/mirrors-ftp/=
odbc/versions/src/psqlodbc-08.03.0400.tar.gz>=3B.
>=3B My PC is run=
ning 32 bit Vista.
>=3B
>=3B First=2C I changed the "afxres.h" r=
eference in psqldb.rc to "windows.h"=2C
>=3B since afxres.h does not e=
xist anywhere on my PC=2C and added
>=3B
>=3B #ifdef IDC_STATIC<=
BR>>=3B #undef IDC_STATIC
>=3B #endif
>=3B #define IDC_STATIC (=
-1) // all static controls
>=3B
>=3B to psqldb.rc (I guess this =
constant is probably intended to be set in
>=3B afxres.h?). With these=
changes=2C I get all the way to the final link=2C
>=3B whereupon I ge=
t
>=3B
>=3B socket.obj : error LNK2001: unresolved external symb=
ol _getaddrinfo@16
>=3B socket.obj : error LNK2001: unresolved externa=
l symbol _freeaddrinfo@4
>=3B socket.obj : error LNK2019: unresolved e=
xternal symbol
>=3B __imp__getnameinfo@28 referenced in function _SOCK=
_connect_to
>=3B .\Release\psqlodbc35w.dll : fatal error LNK1120: 3 un=
resolved externals
>=3B
>=3B from link.exe. Internet searches sa=
y that these symbols should be
>=3B defined in ws2_32.dll=2C but once =
again=2C ws2_32.dll does not exist
>=3B anywhere on my PC. I see that =
the winsock dll's are present in
>=3B \Windows\system32=2C and I'd thi=
nk they should be capable of basic address
>=3B resolution.
>=3B =

>=3B Any tips would be greatly appreciated.
>=3B
>=3B -- <=
BR>>=3B Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
&=
gt=3B To make changes to your subscription:
>=3B http://www.postgresql=
..org/mailpref/pgsql-odbc


Windows Live=99: E-mail. Chat. Shar=
e. Get more ways to connect. d=3DTXT_TAGLM_WL_t2_allup_explore_012009' target=3D'_new'>Check it out.=

=

--_ae159c7d-7171-4b82-a05b-762cd27c9474_--

Re: plea for Windows build help

am 29.01.2009 01:44:16 von Blaine Simpson

That worked. Thanks so much!

FYI, ws2_32 is present on my system. Windows searches were not seeing
it because it's considered hidden for some reason. The visibility
doesn't account for the problem though, because I retried building from
an administration shell, and tried all different values for IDC_STATIC,
to no effect. I have no idea why the functions which I am told are in
ws2_32.lib are not accessible. All of the other details that I
mentioned (other than ws2_32.dll not being present) are accurate.

So now I'm on to trying to build the installer. New question to follow
in separate post.

Thanks


Shoaib Naazir wrote:
> Blain,
>
> I dont know why afxres.h is not present on your system. It should be
> the part of the distro or vc install but you can fix the link errors
> by adding
> ws2_32.lib in your library references. The dll is not used by the
> linker :).
>
> Shoaib.
>
> *Artificial intelligence is no match for natural stupidity!!*
> **
> *Beta Tester Badge 2*
>
>
>
>
> > Date: Wed, 28 Jan 2009 13:43:23 -0500
> > From: blaine.simpson@admc.com
> > To: pgsql-odbc@postgresql.org
> > Subject: [ODBC] plea for Windows build help
> >
> > 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
> >
> .
>
> > 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.


--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc