Error C2872 Ambiguous
Contents |
resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners error c2872 'dword' ambiguous symbol ISV Startups TechRewards Events Community Magazine Forums Blogs Channel 9
Error C2872 'filetime' Ambiguous Symbol
Documentation APIs and reference Dev centers Retired content Samples We’re sorry. The content you error c2872 'idataobject' ambiguous symbol requested has been removed. You’ll be auto redirected in 1 second. C/C++ Building Reference C/C++ Build Errors Compiler Errors C2800 Through C2899 Compiler Errors
Error C2872 'string' Ambiguous Symbol
C2800 Through C2899 Compiler Error C2872 Compiler Error C2872 Compiler Error C2872 Compiler Error C2800 Compiler Error C2801 Compiler Error C2802 Compiler Error C2803 Compiler Error C2804 Compiler Error C2805 Compiler Error C2806 Compiler Error C2807 Compiler Error C2808 Compiler Error C2809 Compiler Error C2810 Compiler Error C2811 error c2872 'hash' ambiguous symbol Compiler Error C2812 Compiler Error C2813 Compiler Error C2814 Compiler Error C2815 Compiler Error C2817 Compiler Error C2818 Compiler Error C2819 Compiler Error C2821 Compiler Error C2823 Compiler Error C2824 Compiler Error C2825 Compiler Error C2827 Compiler Error C2828 Compiler Error C2829 Compiler Error C2830 Compiler Error C2831 Compiler Error C2833 Compiler Error C2834 Compiler Error C2835 Compiler Error C2838 Compiler Error C2839 Compiler Error C2842 Compiler Error C2843 Compiler Error C2844 Compiler Error C2845 Compiler Error C2846 Compiler Error C2847 Compiler Error C2849 Compiler Error C2850 Compiler Error C2854 Compiler Error C2855 Compiler Error C2856 Compiler Error C2857 Compiler Error C2858 Compiler Error C2859 Compiler Error C2860 Compiler Error C2861 Compiler Error C2862 Compiler Error C2863 Compiler Error C2864 Compiler Error C2865 Compiler Error C2867 Compiler Error C2868 Compiler Error C2869 Compiler Error C2870 Compiler Error C2871 Compiler Error C2872 Compiler Er
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring
Error C2872 'iserviceprovider' Ambiguous Symbol
developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question
Ambiguous Symbol Definition
x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; ambiguous symbol visual studio it only takes a minute: Sign up getting error for ambiguous symbol and need help to remove it up vote 1 down vote favorite 1 i am getting this error which i unable to remove in visual studio 2010. https://msdn.microsoft.com/en-us/library/t57wswcs.aspx i am using one third party library which uses its own definition for "string" Also visual studio's xstring file is there in the folder where it gets installed. now when i am trying to compile code i am getting following error 1>...\xyz.cpp(24): error C2872: 'string' : ambiguous symbol 1> could be 'third party library path\string.h(31) 1> or 'c:\program files (x86)\microsoft visual studio 10.0\vc\include\xstring(2063) : std::string' compiler is not able to understand which string definition it should use. How can http://stackoverflow.com/questions/9360375/getting-error-for-ambiguous-symbol-and-need-help-to-remove-it i remove this error in visual studi 2010. I want the code to use third party string definition. i tried to set third party path in include directory but still i am seeing this error. Please help me. Thanks in advance c++ share|improve this question asked Feb 20 '12 at 11:27 novice 19137 Use std::string instead of just string? –BoBTFish Feb 20 '12 at 11:30 @BoBTFish "I want the code to use third party string definition." ;) –user1203803 Feb 20 '12 at 11:31 add a comment| 5 Answers 5 active oldest votes up vote 5 down vote This is an example of a namespace clash. You probably have in your code: #include <3rdPartyString.h> // declaration of 3rd party string type #include
here for a quick overview of the site Help Center Detailed answers to any questions you might http://stackoverflow.com/questions/4000663/issue-in-compiling-with-marshal-h-error-c2872-iserviceprovider-ambiguous have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads https://qualapps.blogspot.com/2008/07/using-atlstrh-in-managed-project.html with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million ambiguous symbol programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Issue in compiling with marshal.h : error C2872: 'IServiceProvider' : ambiguous symbol up vote 18 down vote favorite 2 I am trying to use the marshalling library in my C++/CLI project. When compiled with #include
easy but it wasn't working. [Note: Microsoft factored CString from MFC several years ago, so CString can now be used standalone. Super handy class.]I started with what I thought was a reasonable statement:
#include "cstringt.h"
This gave me numerous errors, starting with:C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\ocidl.h(6238) : error C2872: 'IServiceProvider' : ambiguous symbol
C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlcomcli.h(370) : error C2872: 'DISPPARAMS' : ambiguous symbolWith a little research, I determined I was using the wrong include file. So I switched to:
#include "atlstr.h"
When I tried to do that, I received similar errors:
C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\ocidl.h(6238) : error C2872: 'IServiceProvider' : ambiguous symbol
C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlcomcli.h(370) : error C2872: 'DISPPARAMS' : ambiguous symbol
Several other posts inquiring about the same errors received no answers.The problem is caused because the Microsoft SDK (aka Platform SDK) and mscorlib both have definitions for these classes.The solution is to take the #include file that caused the problem and make sure it is placed before any "using namespace" statement. In my case, that meant moving #include