Borland C++ Builder 6 Error: E2015 Ambiguity between...


I am new to BCB 6, and have taken over a program which is producing the following error:

[C++ Error] myprog.cpp(150): E2015 Ambiguity between '_fastcall Sysutils::GUIDToString(const _GUID &)' and '_fastcall Comobj::GUIDToString(const _GUID &)'

The statement in question:

       guid = GUIDToString(GD);

The header file includes are as follows:

#include <comobj.hpp>

#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <DateUtils.hpp>

#include <Menus.hpp>
#include <ComCtrls.hpp>
#include <Graphics.hpp>
#include <jpeg.hpp>
#include <Grids.hpp>
#include <Registry.hpp>
#include <snmpsend.hpp>
#include <blcksock.hpp>
#include <httpsend.hpp>
#include "synachar.hpp"
#include "PERFGRAP.h"
#include "SHDocVw_OCX.h"
#include <OleCtrls.hpp>
#include <SOAPHTTPTrans.hpp>
#include <Sockets.hpp>

#include <string.h>
#include "voip.h"
#include "PERFGRAP.h"

#include "msxmldom.hpp"
#include "XMLDoc.hpp"
#include "xmldom.hpp"
#include "XMLIntf.hpp"
#include <SOAPHTTPTrans.hpp>
#include <Buttons.hpp>

#include "unit2.h"
#include "math.h"
#include "winuser.h"
#include "stdio.h"
#include "dir.h"
#include <windows.h>
#include <process.h>
#include "fstream.h"
#include "lang_tr.dat"
#include "string.h"
#include "HttpThread.h"

//#include "SysUtils.hpp"

#pragma package(smart_init)
//#pragma link "SysUtils"

Please note that the include for SysUtils.hpp has been commented out.

Any help will be most appreciated - the Borland Help is of no use.

Thanks -

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

>   [C++ Error] myprog.cpp(150): E2015 Ambiguity between '_fastcall Sysutils::GUIDToString(const _GUID &)'
>   and '_fastcall Comobj::GUIDToString(const _GUID &)'

This means that the function GUIDToString exists both in the namespace Sysutils and in Comobj. The compiler cannot choose which one to use. So you have to do that yourself. For example:

       guid = Comobj::GUIDToString(GD);

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
> Please note that the include for SysUtils.hpp has been commented out.

But it is probably included inside one of the other header files. So it is still included.
toddsabAuthor Commented:
Yes, you are right, it is included.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.