Solved

URGENT: C++ Builder type library problem

Posted on 2002-05-13
7
635 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.

776 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