Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

URGENT: C++ Builder type library problem

Posted on 2002-05-13
7
Medium Priority
?
660 Views
Last Modified: 2007-12-19
Hi there,

Please could someone help me with a problem compiling an application using an imported TLB file from an exe COM server written in Visual C++. I am getting ambiguity errors for which there is no logical explanation. The error is "Ambiguity exists between TGUID and System::TGUID". The line pointed out as the line on which the error occurs is in the TLB.h file !!! I cannot understand this.

Please help me as I am getting desperate !!!

Thanks,

Robert Lancaster


0
Comment
Question by:zaroblan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 

Author Comment

by:zaroblan
ID: 7005895
I have 200 more points to give if someone can help me
0
 
LVL 6

Accepted Solution

by:
DrDelphi earned 800 total points
ID: 7006791
it actually does make sense... what is happening is that you have something defined as TGUID in the TLB file, but not specified as being from System. Much the same way you need to specify Graphics::TBitmap rather than just TBitmap,since Tbitmap is also defined in Windows.You should just be able to ammend your code to include the System:: identifier.


Good luck!!
0
 
LVL 9

Expert Comment

by:BeyondWu
ID: 7007822
Are you define TGUID in your VC's component?Redefine it with other name.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:zaroblan
ID: 7007830
Hi there,

There is no definition of any sort redefining TGUID. If I take the type library as-is and include it another project it compiles with no problems. I know that there are twi definitions for TGUID in C++ Builder, one resides in the unit Ole2 and the other one is in System. Ole2 is often, if not always, used when writing COM-based applications. Is there any way around this ?

Thanks,

Robert Lancaster
0
 
LVL 6

Expert Comment

by:DrDelphi
ID: 7008597
Ole2 is not used in current versions of BCB. It was left in a seperate directory for backward compatibility functions (VarToInterface, for example). I suspect that you have your library path set to include that directory when in fact it should not. Also, the lion's share of the newer COM functionality now resides in the COMOBJ,ACTIVEX and AXCTRLS units. Please verify and advise.


Good luck!!
0
 
LVL 11

Expert Comment

by:griessh
ID: 7178728
Dear zaroblan

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to accept

     "DrDelphi"

comment(s) as an answer.


PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 
LVL 6

Expert Comment

by:Mindphaser
ID: 7199777
Force accepted

** Mindphaser - Community Support Moderator **
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question