Samuel wrote:
> Hi,
>
> I want fix a bug in Thunderbird, and I have download the source code tarball
> of thunderbird 2.0.0.22 to modified the source code files, but I can't build
> it with MSVC8.
>
> The following information is the build tools output:
>
> g:/Temp/Test/mozilla/xpcom/base/nsStackFrameWin.cpp(330) : error C2664:
> 'BOOL (H
> ANDLE,PENUMLOADED_MODULES_CALLBACK,PVOID)' : cannot convert parameter 2 from
> 'ov
> erloaded-function' to 'PENUMLOADED_MODULES_CALLBACK'
> None of the functions with this name in scope match the target type
> g:/Temp/Test/mozilla/xpcom/base/nsStackFrameWin.cpp(380) : error C2664:
> 'BOOL (H
> ANDLE,PENUMLOADED_MODULES_CALLBACK64,PVOID)' : cannot convert parameter 2
> from '
> overloaded-function' to 'PENUMLOADED_MODULES_CALLBACK64'
> None of the functions with this name in scope match the target type
> make[3]: *** [nsStackFrameWin.obj] Error 2
> make[3]: Leaving directory `/g/Temp/Test/mozilla/xpcom/base'
> make[2]: *** [libs] Error 2
> make[2]: Leaving directory `/g/Temp/Test/mozilla/xpcom'
> make[1]: *** [tier_2] Error 2
> make[1]: Leaving directory `/g/Temp/Test/mozilla'
> make: *** [default] Error 2
>
> How can I solve these problems?
>
> My system information:
> "Mozilla tools directory: C:\mozilla-build\"
> Windows SDK directory: C:\Program Files\Microsoft SDKs\Windows\v6.0A\
> Windows SDK version: 6.0A
> Setting environment for using Microsoft Visual Studio 2005 x86 tools.
> Mozilla build environment: MSVC version 8.
> Microsoft Windows XP [Ver 5.1.2600.5512] Service Pack 3
> Microsoft Visual Studio 2005 8.0.50727.42
>
> Samuel
> Zeeis Team
> http://www.zeeis.com/
Problem is that you have different windows sdk, but it is solvable.
I've successfully compiled tb2 with win6.0 sdk and with msvc8.
you have to add an explicit type conversion on that line
line 330: enumRes = _EnumerateLoadedModules(aProcess,
(PENUMLOADED_MODULES_CALLBACK)callbackEspecial, (PVOID)&aAddr);
line 380: enumRes = _EnumerateLoadedModules64(aProcess,
(PENUMLOADED_MODULES_CALLBACK64)callbackEspecial64, (PVOID)&aAddr);
you will also need to modify you have to disable some typedefs:
netwerk\system\win32\nsNotifyAddrListener.cpp:
#if 0
typedef enum {
IpPrefixOriginOther = 0,
IpPrefixOriginManual,
IpPrefixOriginWellKnown,
IpPrefixOriginDhcp,
IpPrefixOriginRouterAdvertisement
} IP_PREFIX_ORIGIN;
#endif
typedef NL_PREFIX_ORIGIN IP_PREFIX_ORIGIN;
#if 0
typedef enum {
IpSuffixOriginOther = 0,
IpSuffixOriginManual,
IpSuffixOriginWellKnown,
IpSuffixOriginDhcp,
IpSuffixOriginLinkLayerAddress,
IpSuffixOriginRandom
} IP_SUFFIX_ORIGIN;
#endif
typedef NL_SUFFIX_ORIGIN IP_SUFFIX_ORIGIN;
#if 0
typedef enum {
IpDadStateInvalid = 0,
IpDadStateTentative,
IpDadStateDuplicate,
IpDadStateDeprecated,
IpDadStatePreferred
} IP_DAD_STATE;
#endif
#if 0
typedef enum {
IfOperStatusUp = 1,
IfOperStatusDown,
IfOperStatusTesting,
IfOperStatusUnknown,
IfOperStatusDormant,
IfOperStatusNotPresent,
IfOperStatusLowerLayerDown
} IF_OPER_STATUS;
#endif
you will encountered with crash during build in xpidl because it is
linked without microsoft manifest.
When I built it I also changed WINVER in configure.* to
AC_DEFINE_UNQUOTED(WINVER,0x500).
PM-