Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » ambiguous unresolved functions(In Problems view, standard function calls are flagged as problems)
ambiguous unresolved functions [message #808301] Mon, 27 February 2012 16:22 Go to next message
Uhlersoth 872325412 is currently offline Uhlersoth 872325412Friend
Messages: 8
Registered: July 2009
Junior Member
First, please bear in mind that I'm a natural-born Java developer, so whatever is going on here is likely entirely my fault, and likely a trivial env problem.

I'm setting up a new C++ project using CDT (Version: Indigo Service Release 1 / Build id: 20110916-0149), since I'm so fond of the Eclipse Java IDE. I have Visual Studio 2003 installed as well, though I'm attempting to avoid using its IDE. My C++ project consists of half a dozen .cpp and .h files. Some of the .cpp files include libraries such as stdio.h, windows.h, and stdlib.h.

By right clicking the project and selecting Properties, I've (1) enabled the Indexer under C/C++ General --> Indexer, (2) set the INCLUDE and LIB env variables under C/C++ Build --> Environment to point to my Visual Studio include and lib dirs, and added several directories under C/C++ General --> Paths and Symbols / Includes / C++ Source File, such as Visual Studio's Vc7\lib, Vc7\PlatformSDK\Include, and VC7\include dirs. This clears most of my initial project errors (brings me down from 300+ errors to eight).

But as mentioned, I'm still seeing several error messages under Problems when I open one of the .cpp files. Some of the messages I'm seeing are:

'remove' is ambiguous 'Candidates are:int remove(const char *)'
'rename' is ambiguous 'Candidates are:int rename(const char *, const char *)'
Function 'fileno' could not be resolved

On the rename and remove errors, when I press F3 on either function to open the declaration, Eclipse pops up a dialog asking me to choose between the io.h and the stdio.h files located in the Vc7\include directory. As for the fileno, I've been told this is a standard C function, so I'm curious why it can't be resolved.

Can anyone shed some light on why I'm seeing these errors and what I can do to remedy them?
Re: ambiguous unresolved functions [message #809948 is a reply to message #808301] Wed, 29 February 2012 13:39 Go to previous messageGo to next message
Harry Houdini is currently offline Harry HoudiniFriend
Messages: 142
Registered: February 2010
Senior Member
Uhlersoth 872325412 wrote on Mon, 27 February 2012 17:22
I have Visual Studio 2003 installed as well, though I'm attempting to avoid using its IDE.

Why ?

Uhlersoth 872325412 wrote on Mon, 27 February 2012 17:22
'remove' is ambiguous 'Candidates are:int remove(const char *)'
'rename' is ambiguous 'Candidates are:int rename(const char *, const char *)'
Function 'fileno' could not be resolved

Could you paste the call of the rename function ?
Re: ambiguous unresolved functions [message #811649 is a reply to message #809948] Fri, 02 March 2012 16:42 Go to previous messageGo to next message
Uhlersoth 872325412 is currently offline Uhlersoth 872325412Friend
Messages: 8
Registered: July 2009
Junior Member
There are some "political" reasons for not using VS. Let's leave it at that. Smile

Here is the rename function call:

rename(fileName.c_str(), oldFile.c_str());

Re: ambiguous unresolved functions [message #850294 is a reply to message #811649] Thu, 19 April 2012 23:54 Go to previous message
Chris Miami is currently offline Chris MiamiFriend
Messages: 4
Registered: July 2011
Junior Member
I was having the same problem, except mine was:

using namespace std;


[ std is ambiguous. candidates are ' ]

Some C++ project types have "built-in" settings for include paths, some do not. I copied the built-ins from a Hello World project and that seems to have fixed a multitude of sins. Unfortunately, the settings weren't written in the Export... file, and couldn't be copy/pasted, so I had to take a screen shot (attached here) and type them all in 1-by-1 (ughs....). Smile

Thanks,
Chris

index.php/fa/7995/0/
  • Attachment: includes.png
    (Size: 12.09KB, Downloaded 4512 times)

[Updated on: Fri, 20 April 2012 00:16]

Report message to a moderator

Previous Topic:Program terminated without execution
Next Topic:Managed Make calls linker before all modules have been compiled
Goto Forum:
  


Current Time: Fri Apr 26 22:23:21 GMT 2024

Powered by FUDForum. Page generated in 0.03241 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top