• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6709
  • Last Modified:

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

Hi,

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 -

Todd
0
toddsab
Asked:
toddsab
  • 2
1 Solution
 
cwwkieCommented:
>   [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);
0
 
cwwkieCommented:
> 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.
0
 
toddsabAuthor Commented:
Yes, you are right, it is included.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now