Function can't be resolved error [message #1000196] |
Mon, 14 January 2013 08:39 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
I tried making a makefile project from existing code. When I edit, I constantly get errors indicating that the include files weren't recognized (such as: Function can't be resolved). So, I figured I'd make a corresponding Hello World project using the wizard to see the "right" way. I get the same problem from the very beginning.
There are no error flags on the include files so I assume they are being found. It just seems they aren't being considered.
Is there something special I need to do to make this work? I've tied searching for similar problems but only found non-applicable ones or those with no answers. This is very puzzling and I'd hate to have to convert what I have to individual projects.
DAV
#include <stdio.h>
#include <stdlib.h>
int main(void) {
puts("Hello World!!!");
return EXIT_SUCCESS;
}
Description Resource Path Location Type
Function 'puts' could not be resolved Hello.cpp /Hello line 13 Semantic Error
[Updated on: Mon, 14 January 2013 08:45] Report message to a moderator
|
|
|
|
|
Re: Function can't be resolved error [message #1000559 is a reply to message #1000517] |
Tue, 15 January 2013 01:45 |
John LaLuna Messages: 4 Registered: September 2011 |
Junior Member |
|
|
I'm having similar problems, but probably not for the same reasons.
Function 'Sleep' could not be resolved main.cpp /sfmltest line 22 Semantic Error
Invalid overload of 'endl' main.cpp /sfmltest line 21 Semantic Error
Method 'GetElapsedTime' could not be resolved main.cpp /sfmltest line 19 Semantic Error
Method 'GetElapsedTime' could not be resolved main.cpp /sfmltest line 21 Semantic Error
Type 'sf::Clock' could not be resolved main.cpp /sfmltest line 18 Semantic Error
#include <SFML/System.hpp>
#include <iostream>
//#include <iomanip>
using namespace std;
int main()
{
sf::Clock Clock;
while (Clock.GetElapsedTime() < 5.f)
{
cout << Clock.GetElapsedTime() << endl;
sf::Sleep(0.5f);
}
return 0;
}
I'm attempting to configure SFML to work with Eclipse.
What's funny is that it does compile and link and I can run the executable from the Debug folder and it works exactly as it should, but I still get these errors, and in the editor it shows errors and red underlines in the code.
I've been using Eclipse CDT for the last 2 years at school, but this is the first time I've tried to use an external library.
[Updated on: Tue, 15 January 2013 01:46] Report message to a moderator
|
|
|
|
Re: Function can't be resolved error [message #1000897 is a reply to message #1000769] |
Tue, 15 January 2013 16:38 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
John is getting the same errors as I am. It also doesn't explain why the example I posted above exhibits similar problems. In my case, the includes are already in the include path.
I've attached a typical error and a snap of the includes list. I'm at a loss as to what else can be done.
BTW: notice the "/usr/local/unclude"? I had misspelled "include" when I added the path as you suggested. I subsequently edited the entry but now there's an entry I'm not allowed to delete.
UPDATE: The undeletable path was cute at first but it's beginning to be annoying. I can't compile because its not a valid path. I can't delete it because it's greyed out. It's not being kept in the .cproject file with the rest of the includes I've added yet I can export it. ARRGH! So, maybe the problem with the Code Analysis is because there are apparently multiple lists of include files (which IMO is not very good design)?
UPDATE2: Well, I found the phantom include in the g++ command lines contained in the *.sc and *_scd.mk files. After I edited those, the "unclude" disappeared. Something else to add to the test suite assuming there is one.
[Updated on: Tue, 15 January 2013 18:30] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05019 seconds