Solved

URGENT: C++ Builder type library problem

Posted on 2002-05-13
7
618 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 200 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now