Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

URGENT: C++ Builder type library problem

Posted on 2002-05-13
7
Medium Priority
?
666 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
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
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 goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

885 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