Iserviceprovider Ambiguous Symbol Error
Contents |
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
Iserviceprovider Ambiguous Symbol Servprov H
site About Us Learn more about Stack Overflow the company Business Learn more cannot use this indirection on type iserviceprovider about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x
Error C2872: 'filetime' : Ambiguous Symbol
Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Issue in error c2872 ambiguous symbol 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
> Visual C++ Question 0 Sign in to vote Trying to compile a C++ WinForms Winsock related project with /clr option I get a
System::string To Std::string
few errors after adding #include
Forum Visual C++ & C++ Programming Managed C++ and C++/CLI 'IServiceProvider' : ambiguous symbol If this is your first visit, http://forums.codeguru.com/showthread.php?343197-IServiceProvider-ambiguous-symbol be sure to check out the FAQ by clicking the link above. https://www.experts-exchange.com/questions/22938643/error-C2872-'IServiceProvider'-ambiguous-symbol.html You may have to register or Login before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 1 of 1 Thread: 'IServiceProvider' : ambiguous symbol Tweet Thread Tools ambiguous symbol Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode May 31st, 2005,01:14 PM #1 sameer_ib View Profile View Forum Posts Junior Member Join Date May 2005 Posts 1 'IServiceProvider' : ambiguous symbol i have this problem: c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\ServProv.h(48) : warning C4935: assembly access specifier iserviceprovider ambiguous symbol modified from 'public' c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\ServProv.h(93) : error C2872: 'IServiceProvider' : ambiguous symbol could be 'c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\ServProv.h(48) : System::IServiceProvider IServiceProvider' or 'C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\vcclr.h(15) : System::IServiceProvider' c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\ServProv.h(100) : fatal error C1903: unable to recover from previous error(s); stopping compilation what can be the problem?? :S Reply With Quote Quick Navigation Managed C++ and C++/CLI Top Site Areas Settings Private Messages Subscriptions Who's Online Search Forums Forums Home Forums Visual C++ & C++ Programming Visual C++ Programming Visual C++ FAQs C++ (Non Visual C++ Issues) C++ and WinAPI Managed C++ and C++/CLI Visual C++ Bugs & Fixes Graphics Programming Multithreading Network Programming Driver Development C# Programming C-Sharp Programming Visual Basic Programming Visual Basic 6.0 Programming Visual Basic .NET VBForums Windows 8 and Later Store Development Modern Windows Apps (Metro) Other .NET Programming ASP.NET .NET Framework .NET Installation and Configuration Issues ADO.NET Windows Presentation Foundation (WPF) & XAML forum Java Programming Java Programming Other Programming AJAX Scripting - Client Side Database Crystal Reports XML W
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > error C2872: 'IServiceProvider' : ambiguous symbol Want to Advertise Here? Solved error C2872: 'IServiceProvider' : ambiguous symbol Posted on 2007-11-05 C++ 3 Verified Solutions 5 Comments 2,089 Views Last Modified: 2008-01-09 I am getting: error C2872: 'IServiceProvider' : ambiguous symbol When I try to link my Managed C++ to a Static Lib. I believe this error is due to: unmanaged IServiceProvider conflicts with the System::IServiceProvider. So I exclude: mscorlib I also remove namespaces from my Managed C++ app. But still I get this error, anyone got any ideas? Cheers 0 Question by:directxBOB Facebook Twitter LinkedIn Google LVL 39 Best Solution byitsmeandnobodyelse >>>> When I try to link my Managed C++ to a Static Lib ??? You can't 'link' managed code to unmanaged code. Compiled managed code gives intermediate code which is asubject of the just-in-time compiler Go to Solution 5 Comments LVL 39 Overall: Level 39 C++ 35 Message Accepted Solution by:itsmeandnobodyelse2007-11-05 >>>> When I try to link my Managed C++ to a Static Lib ??? You can't 'link' managed code to unmanaged code. Compiled managed code gives intermediate code which is asubject of the just-in-time compiler while a static lib has compiled object code. The only way to combine managed code to unmanaged code is to use the Marshal wrappers within managed code, that means you can call unmanaged code from managed code via marshaling but not vice versa. Regards, Alex 0 LVL 39 Overall: Level 39 C++ 32 Message Active 1 day ago Assisted Solution by:evilrix2007-11-05 If you can rebuild the static lib as a DLL you can use P/Invo