Function can't be resolved error [message #1000196] |
Mon, 14 January 2013 03:39  |
Eclipse User |
|
|
|
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 03:45] by Moderator
|
|
|
|
|
|
|
|
|
Re: Function can't be resolved error [message #1001037 is a reply to message #1000769] |
Tue, 15 January 2013 17:28  |
Eclipse User |
|
|
|
Axel Mueller wrote on Tue, 15 January 2013 07:09These are not build errors (from the compiler) but "semantic errors". The internal code analyzer (CODAN) creates them. CODAN depends on the CDT index that represents the structure of your source code with all declarations, definitions etc. (the index is used e.g. to get code completion, jump to to the declaration/definition with the key F3 etc.)
In your case it looks like the index is not complete. You should add the include paths for your external library to Project Properties->C/C++ general->Paths and Symbols and then rebuild the index (from the project's context menu).
The path to the external library was already included, but I faux edited it and pressed Apply which resulted in a popup asking to rebuild the index. Once that was done the "semantic" errors went away. Curiously this resulted in another minor problem. lol. When I attempt to RUN the program it gets rebuilt and claims that the #includes no longer exist. "fatal error: SFML/Audio.hpp: No such file or directory main.cpp /sfmltest line 8 C/C++ Problem"
It's a minor problem that I can live with, but annoying. I can build it, and the executable does work as intended.
|
|
|
Powered by
FUDForum. Page generated in 0.28206 seconds