Discussion:
trouble compiling liblwres on Windows (BIND 9.3.0)
(too old to reply)
Stefan Puiu
2005-01-20 15:22:48 UTC
Permalink
Hi again,

it seems building liblwres from BIND 9.3.0 on Windows 2000 requires
iphlpapi.h, a file which is supposed to be in the MS SDK. However, the
file isn't part of my Microsoft Visual C++ 6.0 (+SP5) install. I see the
win32utils/win32-build.txt file states MS VC++ 6.0 SP3 as a minimum
requirement, but doesn't seem to have been updated lately (no change
between 9.2.3 and 9.3.0, the date inside is from 2001). Any changes in
the build requirements for Windows I should know about?

Thanks in advance.
Stefan Puiu
2005-01-20 15:39:22 UTC
Permalink
The compiler fails on liblwres with the message:

W:\Z\kits\BIND\bind-9.3.0\lib\lwres\win32\lwconfig.c(42) : fatal error
C1083: Cannot open include file: 'iphlpapi.h': No such file or directory

That's where I got the impression that the file was required for the
build :D.

Stefan Puiu wrote:

>Hi again,
>
>it seems building liblwres from BIND 9.3.0 on Windows 2000 requires
>iphlpapi.h, a file which is supposed to be in the MS SDK. However, the
>file isn't part of my Microsoft Visual C++ 6.0 (+SP5) install. I see the
>win32utils/win32-build.txt file states MS VC++ 6.0 SP3 as a minimum
>requirement, but doesn't seem to have been updated lately (no change
>between 9.2.3 and 9.3.0, the date inside is from 2001). Any changes in
>the build requirements for Windows I should know about?
>
>Thanks in advance.
>
>
>
>
>
Mark Andrews
2005-01-20 22:18:15 UTC
Permalink
>
> The compiler fails on liblwres with the message:
>
> W:\Z\kits\BIND\bind-9.3.0\lib\lwres\win32\lwconfig.c(42) : fatal error
> C1083: Cannot open include file: 'iphlpapi.h': No such file or directory
>
> That's where I got the impression that the file was required for the
> build :D.

Well I build w/ a later version of the compiler (couldn't buy
6.0). Danny, as far as I know, still build w/ 6.0 and hasn't
reported a problem.

I would be double checking you havn't lost the header file.
I have it as Vc7/PlatformSDK/Include/IPHlpApi.h

> Stefan Puiu wrote:
>
> >Hi again,
> >
> >it seems building liblwres from BIND 9.3.0 on Windows 2000 requires
> >iphlpapi.h, a file which is supposed to be in the MS SDK. However, the
> >file isn't part of my Microsoft Visual C++ 6.0 (+SP5) install. I see the
> >win32utils/win32-build.txt file states MS VC++ 6.0 SP3 as a minimum
> >requirement, but doesn't seem to have been updated lately (no change
> >between 9.2.3 and 9.3.0, the date inside is from 2001). Any changes in
> >the build requirements for Windows I should know about?
> >
> >Thanks in advance.
> >
> >
> >
> >
> >
>
>
--
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: ***@isc.org
Danny Mayer
2005-01-21 01:32:10 UTC
Permalink
At 05:18 PM 1/20/2005, Mark Andrews wrote:

> >
> > The compiler fails on liblwres with the message:
> >
> > W:\Z\kits\BIND\bind-9.3.0\lib\lwres\win32\lwconfig.c(42) : fatal error
> > C1083: Cannot open include file: 'iphlpapi.h': No such file or directory
> >
> > That's where I got the impression that the file was required for the
> > build :D.
>
> Well I build w/ a later version of the compiler (couldn't buy
> 6.0). Danny, as far as I know, still build w/ 6.0 and hasn't
> reported a problem.
>
> I would be double checking you havn't lost the header file.
> I have it as Vc7/PlatformSDK/Include/IPHlpApi.h

VC++ V6 do not include the necessary files and you need to get them
from the SDK. V7 (aka .NET) includes these files and you don't need
the SDK for them. For V6 you need the following 4 files from the SDK:
iphlpapi.h
iptypes.h
ipexport.h
iphlpapi.lib

If you don't want to install the SDK you can just copy these files. I just
put the headers into the VC98/Include directory and the link library into
the VC98/Lib directory. After that everything builds.

Note that this is a requirement as of 9.3.0. The 9.2.x versions don't
use it. It was necessary in order to deal correctly with the nameserver
list, domain and domain search information. Looking at the tarball
I notice that the win32utils/win32-build.txt file which contain build
instructions hasn't been updated to reflect this change.

Note I have built on V7 also without problems.

Danny


>
> > Stefan Puiu wrote:
> >
> > >Hi again,
> > >
> > >it seems building liblwres from BIND 9.3.0 on Windows 2000 requires
> > >iphlpapi.h, a file which is supposed to be in the MS SDK. However, the
> > >file isn't part of my Microsoft Visual C++ 6.0 (+SP5) install. I see the
> > >win32utils/win32-build.txt file states MS VC++ 6.0 SP3 as a minimum
> > >requirement, but doesn't seem to have been updated lately (no change
> > >between 9.2.3 and 9.3.0, the date inside is from 2001). Any changes in
> > >the build requirements for Windows I should know about?
> > >
> > >Thanks in advance.
> > >
> > >
> > >
> > >
> > >
> >
> >
>--
>Mark Andrews, ISC
>1 Seymour St., Dundas Valley, NSW 2117, Australia
>PHONE: +61 2 9871 4742 INTERNET: ***@isc.org
Stefan Puiu
2005-01-21 10:37:34 UTC
Permalink
Danny Mayer wrote:

>At 05:18 PM 1/20/2005, Mark Andrews wrote:
>VC++ V6 do not include the necessary files and you need to get them
>from the SDK. V7 (aka .NET) includes these files and you don't need
>the SDK for them. For V6 you need the following 4 files from the SDK:
>iphlpapi.h
>iptypes.h
>ipexport.h
>iphlpapi.lib
>
>If you don't want to install the SDK you can just copy these files. I just
>put the headers into the VC98/Include directory and the link library into
>the VC98/Lib directory. After that everything builds.
>
>

Not quite. The compiler would choke on iphlpapi.h with the following error:

c:\program files\microsoft visual studio\vc98\include\iphlpapi.h(183) :
error C2146: syntax error : missing ')' before identifier 'pStats'
c:\program files\microsoft visual studio\vc98\include\iphlpapi.h(183) :
error C2061: syntax error : identifier 'pStats'
c:\program files\microsoft visual studio\vc98\include\iphlpapi.h(183) :
error C2059: syntax error : ';'
c:\program files\microsoft visual studio\vc98\include\iphlpapi.h(183) :
error C2059: syntax error : ','
c:\program files\microsoft visual studio\vc98\include\iphlpapi.h(185) :
error C2059: syntax error : ')'

The line that was causing the error has something like:

OUT PMIB_ICMP_EX pStats,

with PMIB_ICMP_EX not being defined anywhere. I checked the SDK and it
seems to be defined in Iprtrmib.h; that file already exists in
VC98\Include, so I kept a copy of the old one and overwrote it with the
one from the SDK. Now liblwres builds just fine, and so does named (and
the other binaries).

We don't have licenses for MSDEV 7, unfortunately, so I can't build with
that compiler/header files/libraries set right now.

>Note that this is a requirement as of 9.3.0. The 9.2.x versions don't
>use it. It was necessary in order to deal correctly with the nameserver
>list, domain and domain search information. Looking at the tarball
>I notice that the win32utils/win32-build.txt file which contain build
>instructions hasn't been updated to reflect this change.
>
>Note I have built on V7 also without problems.
>
>Danny
>
>
>
>
Danny Mayer
2005-01-22 00:43:02 UTC
Permalink
At 05:37 AM 1/21/2005, Stefan Puiu wrote:

>Danny Mayer wrote:
>
>>At 05:18 PM 1/20/2005, Mark Andrews wrote:
>>VC++ V6 do not include the necessary files and you need to get them
>>from the SDK. V7 (aka .NET) includes these files and you don't need
>>the SDK for them. For V6 you need the following 4 files from the SDK:
>>iphlpapi.h
>>iptypes.h
>>ipexport.h
>>iphlpapi.lib
>>
>>If you don't want to install the SDK you can just copy these files. I just
>>put the headers into the VC98/Include directory and the link library into
>>the VC98/Lib directory. After that everything builds.
>>
>
>Not quite. The compiler would choke on iphlpapi.h with the following error:
>
>c:\program files\microsoft visual studio\vc98\include\iphlpapi.h(183) :
>error C2146: syntax error : missing ')' before identifier 'pStats'
>c:\program files\microsoft visual studio\vc98\include\iphlpapi.h(183) :
>error C2061: syntax error : identifier 'pStats'
>c:\program files\microsoft visual studio\vc98\include\iphlpapi.h(183) :
>error C2059: syntax error : ';'
>c:\program files\microsoft visual studio\vc98\include\iphlpapi.h(183) :
>error C2059: syntax error : ','
>c:\program files\microsoft visual studio\vc98\include\iphlpapi.h(185) :
>error C2059: syntax error : ')'
>
>The line that was causing the error has something like:
>
> OUT PMIB_ICMP_EX pStats,
>
>with PMIB_ICMP_EX not being defined anywhere. I checked the SDK and it
>seems to be defined in Iprtrmib.h; that file already exists in
>VC98\Include, so I kept a copy of the old one and overwrote it with the
>one from the SDK. Now liblwres builds just fine, and so does named (and
>the other binaries).

Well I used an older version of the SDK. If you install the SDK you don't have
this problem. I just told you what I did since I didn't want to install a large
kit on a system which was short on space.

Danny
Loading...