Jeffrey Walton
2009-03-19 00:58:03 UTC
Hi All,
I'm trying to build a Visual Studio add-in. When the add-in was purely
command line, all was fine. I then added a CDialogImpl for some UI
elements and encountered collisions on LONG_PTR and ULONG_PTR.
Project files, such as MyAddin use the EnvDTE namspace. Commenting the
'using' to stop pollution (and bringing in objects as required) did
not help. Also, I *did not* bring in the offenders: EnvDTE::LONG_PTR
or EnvDTE::ULONG_PTR.
Any ideas on how to resole this? I read through a previous post which
in which Igor stated that there is no 'un-use namespace' and to bring
in objects as required. As stated, the later did not help. I also know
that I cannot arbitrarily wrap namespaces around libraries.
In the excerpt below, c:\addin\debug\dte80a.tlh is a temporary
produced by the midl compiler. When I attempt to edit, it gets over
written during compile.
Jeff
1>c:\program files\microsoft sdks\windows\v6.1\include\mshtml.h
(18964) : error C2872: 'LONG_PTR' : ambiguous symbol
1> could be 'c:\program files\microsoft sdks\windows\v6.1\include
\basetsd.h(138) : __w64 long LONG_PTR'
1> or 'c:\addin\debug\dte80a.tlh(469) : EnvDTE::LONG_PTR'
1>c:\program files\microsoft visual studio 8\vc\atlmfc\include\atlwin.h
(524) : error C2872: 'ULONG_PTR' : ambiguous symbol
1> could be 'c:\program files\microsoft sdks\windows\v6.1\include
\basetsd.h(139) : __w64 unsigned long ULONG_PTR'
1> or 'c:\cryptoppaddin\debug\dte80a.tlh(464) : EnvDTE::ULONG_PTR'
I'm trying to build a Visual Studio add-in. When the add-in was purely
command line, all was fine. I then added a CDialogImpl for some UI
elements and encountered collisions on LONG_PTR and ULONG_PTR.
Project files, such as MyAddin use the EnvDTE namspace. Commenting the
'using' to stop pollution (and bringing in objects as required) did
not help. Also, I *did not* bring in the offenders: EnvDTE::LONG_PTR
or EnvDTE::ULONG_PTR.
Any ideas on how to resole this? I read through a previous post which
in which Igor stated that there is no 'un-use namespace' and to bring
in objects as required. As stated, the later did not help. I also know
that I cannot arbitrarily wrap namespaces around libraries.
In the excerpt below, c:\addin\debug\dte80a.tlh is a temporary
produced by the midl compiler. When I attempt to edit, it gets over
written during compile.
Jeff
1>c:\program files\microsoft sdks\windows\v6.1\include\mshtml.h
(18964) : error C2872: 'LONG_PTR' : ambiguous symbol
1> could be 'c:\program files\microsoft sdks\windows\v6.1\include
\basetsd.h(138) : __w64 long LONG_PTR'
1> or 'c:\addin\debug\dte80a.tlh(469) : EnvDTE::LONG_PTR'
1>c:\program files\microsoft visual studio 8\vc\atlmfc\include\atlwin.h
(524) : error C2872: 'ULONG_PTR' : ambiguous symbol
1> could be 'c:\program files\microsoft sdks\windows\v6.1\include
\basetsd.h(139) : __w64 unsigned long ULONG_PTR'
1> or 'c:\cryptoppaddin\debug\dte80a.tlh(464) : EnvDTE::ULONG_PTR'