473,390 Members | 1,269 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,390 software developers and data experts.

VS 2003 upgrades results in C2872: 'CONNECTDATA' ambiguous symbol

I have a VS6 project which I brought into VS .NET, and all has been
building fine. Then I upgraded to VS 2003 and I have one source which
will no longer compile. Any clues?

Compiling...
DotNetManagedExport.cpp
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\atlmfc\include\atlcom.h(5529) : error C2872: 'CONNECTDATA' :
ambiguous symbol
could be 'C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include\OCIdl.h(395) : tagCONNECTDATA
CONNECTDATA'
or 'C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\vcclr.h(15) :
System::Runtime::InteropServices::CONNECTDATA'
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\xmemory(136) : while compiling class-template member
function 'HRESULT
ATL::IConnectionPointImpl<T,piid,CDV>::EnumConnect ions(IEnumConnection
s ** )'
with
[
T=CKeyBuild,
piid=& _GUID_d74f30ea_21d1_4857_b8d2_75ba604fc8a1,
CDV=ATL::CComDynamicUnkArray
]
d:\ODP\PPS\PPS System\PPSLibNET\_IKeyBuildEvents_CP.h(6) : see
reference to class template instantiation
'ATL::IConnectionPointImpl<T,piid,CDV>' being compiled
with
[
T=CKeyBuild,
piid=& _GUID_d74f30ea_21d1_4857_b8d2_75ba604fc8a1,
CDV=ATL::CComDynamicUnkArray
]
d:\ODP\PPS\PPS System\PPSLibNET\KeyBuild.h(17) : see reference to
class template instantiation 'CProxy_IKeyBuildEvents<T>' being
compiled
with
[
T=CKeyBuild
]
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\atlmfc\include\atlcom.h(5530) : error C2872: 'CONNECTDATA' :
ambiguous symbol
could be 'C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include\OCIdl.h(395) : tagCONNECTDATA
CONNECTDATA'
or 'C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\vcclr.h(15) :
System::Runtime::InteropServices::CONNECTDATA'
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\atlmfc\include\atlcom.h(5537) : error C2872: 'CONNECTDATA' :
ambiguous symbol
could be 'C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include\OCIdl.h(395) : tagCONNECTDATA
CONNECTDATA'
or 'C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\vcclr.h(15) :
System::Runtime::InteropServices::CONNECTDATA'
Nov 16 '05 #1
3 2706

--------------------
From: "Lee Gillie" <AN*******************@odp.com>
Subject: VS 2003 upgrades results in C2872: 'CONNECTDATA' ambiguous symbol
Date: Wed, 6 Aug 2003 07:55:26 -0700
Lines: 62
I have a VS6 project which I brought into VS .NET, and all has been
building fine. Then I upgraded to VS 2003 and I have one source which
will no longer compile. Any clues?


Try moving your "using namespace System;" directive down after the
#includes. Does that solve the problem?

--
Arjun Bijanki, Microsoft Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Nov 16 '05 #2
Ajun -

Thanks for replying. I tried what you suggested, but it made no
difference. I tried also moving the #using <xxx.dll> statements.

- Lee

"Arjun Bijanki [VCPP MSFT]" <ar****@online.microsoft.com> wrote in
message news:18**************@cpmsftngxa06.phx.gbl...

--------------------
From: "Lee Gillie" <AN*******************@odp.com>
Subject: VS 2003 upgrades results in C2872: 'CONNECTDATA' ambiguous symbol Date: Wed, 6 Aug 2003 07:55:26 -0700
Lines: 62

I have a VS6 project which I brought into VS .NET, and all has been building fine. Then I upgraded to VS 2003 and I have one source which will no longer compile. Any clues?


Try moving your "using namespace System;" directive down after the
#includes. Does that solve the problem?

--
Arjun Bijanki, Microsoft Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no

rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Nov 16 '05 #3

--------------------
From: "Lee Gillie" <AN*******************@odp.com>
References: <ug**************@TK2MSFTNGP09.phx.gbl> <18**************@cpmsftngxa06.phx.gbl>Subject: Re: VS 2003 upgrades results in C2872: 'CONNECTDATA' ambiguous symbolDate: Tue, 12 Aug 2003 09:13:32 -0700
Lines: 37
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <ei*************@tk2msftngp13.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vc
NNTP-Posting-Host: user.odp.com 204.130.175.250
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftn gp13.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vc:27149
X-Tomcat-NG: microsoft.public.dotnet.languages.vc

Ajun -

Thanks for replying. I tried what you suggested, but it made no
difference. I tried also moving the #using <xxx.dll> statements.

- Lee

"Arjun Bijanki [VCPP MSFT]" <ar****@online.microsoft.com> wrote in
message news:18**************@cpmsftngxa06.phx.gbl...

--------------------
> From: "Lee Gillie" <AN*******************@odp.com>
> Subject: VS 2003 upgrades results in C2872: 'CONNECTDATA'ambiguous symbol > Date: Wed, 6 Aug 2003 07:55:26 -0700
> Lines: 62

>
> I have a VS6 project which I brought into VS .NET, and all hasbeen > building fine. Then I upgraded to VS 2003 and I have one sourcewhich > will no longer compile. Any clues?
>


Try moving your "using namespace System;" directive down after the
#includes. Does that solve the problem?

--
Arjun Bijanki, Microsoft Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no

rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm



Lee,

The ambiguous symbol error simply says that the compiler has seen a symbol
called "CONNECTDATA" and it can't determine whether it's the one from the
namespace System::Runtime::InteropServices or the one from the global
namespace. Presumably you have a using namespace
System::Runtime::InteropServices directive somewhere in your code. Try
doing one of these:

1. Localize the directive. Instead of putting it in the global namespace
move it to a local scope where you need it.

2. Use a *using declaration* instead of a using directive:

using System::Runtime::InteropServices::CONNECTDATA;

If there's any ambiguity at this point, you'll get an immediate error.

3. Remove the using directive and use the fully qualified name.

Option (3) should solve your problem if (1) and (2) don't work.
--
Tanveer Gani, Microsoft Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: nmyatt | last post by:
Hi, The project I'm working on consists mainly of legacy VC6 C++ and VB, but we wish to write all new code in C#. So I'm looking at ways for exposing .NET functionality to VB and C++ through...
3
by: SteveM | last post by:
I am trying to learn C++ (taking classes at the University of Washington) but have run across a bit of confusion with respect to function templates. It appears that VS 2003 has a different way of...
1
by: bor_kev | last post by:
Hi, i am developing under Microsoft Visual Studio 2005 (C++). I am using managed classes ( ref class Myclass) and STL.NET but i am facing two main problems : - As u know, now pointers are...
0
by: gerry.brennan | last post by:
Hi, I have a project which accesses a database via a database interface class which uses #include microsoft library. In the header file for this database class I have a prototype which...
1
by: Rick | last post by:
Error 2 error C2872: 'IDataObject' : ambiguous symbol C:\Archivos de programa\Microsoft Visual Studio 8\VC\PlatformSDK\include\objidl.h 7408 this is the error i got by mix managed and unmanaged...
9
by: Prasad | last post by:
HI, I am a beginner in VC++.. I am trying to write a Win32 console application in visual studio.. I am using following header files.. #include <STRING> using namespace std; #include...
6
by: phnimx | last post by:
I'm attempting to migrate a predominately MFC application that I've just inherited from Visual Studio.NET 2003 to Visual Studio 2005. I've managed to clean up a myriad of compile and link errors...
2
sangeetha jagannathan
by: sangeetha jagannathan | last post by:
hi i am migrating from vc++6 to vc++7.1. when i compile i encounter the following errors w:\tools\util\rw_utilities.h(99) : error C2872: 'ostream' : ambiguous symbol...
0
by: aWiproUser | last post by:
I am upgrading my project from VC 6 to VC++.NET i am getting c2872 error. Could help me regarding this.
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.