Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Linux Tools Project » Syntax error in editor [wrong], but make succeeds [correct]
Syntax error in editor [wrong], but make succeeds [correct] [message #749375] Tue, 25 October 2011 07:20 Go to next message
Michael Gras is currently offline Michael GrasFriend
Messages: 2
Registered: October 2011
Junior Member
Hello,

I'm new to Linux Tools in Eclipse and after setting up a project, I have the following problem.

Although may code is correct and can be compiled using make inside and outside from eclipse, but the code editor says that I have (many) syntax errors. Any idea what can be wrong?

Thank you
Mischa

Re: Syntax error in editor [wrong], but make succeeds [correct] [message #750055 is a reply to message #749375] Tue, 25 October 2011 15:53 Go to previous messageGo to next message
Jeff Johnston is currently offline Jeff JohnstonFriend
Messages: 215
Registered: July 2009
Senior Member
You'll have to give some more information. What kind of project did you create? How did you create it? What are the errors you are seeing? The C/C++ CODAN analyzer will warn you about things that are bad coding practices, even though they won't stop your program from compiling. The markers for CODAN are little bugs. Errors are red, warnings are yellow and informational markers are usually blue. Perhaps you are getting warnings instead of errors. You can hover over the error/warning markers in the left margin and you'll get more information about what it is complaining about.

The indexer will try and parse your code and if it cannot resolve certain header files, it will flag certain things such as macros it does not know about.
Re: Syntax error in editor [wrong], but make succeeds [correct] [message #750125 is a reply to message #750055] Tue, 25 October 2011 16:42 Go to previous messageGo to next message
Michael Gras is currently offline Michael GrasFriend
Messages: 2
Registered: October 2011
Junior Member
I created a "Hello World C++ Autotools Project" using the GNU Autotools toolchain.
After that I replace all files with the files from my standard autotools project.
The bugs(!) that CODAN shows be are "could not be resolved" messages.

I retried to create an empty Autotools Project. This looks more promising, no compiler errors remain.

But, thank you for your help. You gave me the idea to create the empty autotools project. I think that the includes were messed up.
Re: Syntax error in editor [wrong], but make succeeds [correct] [message #753019 is a reply to message #750125] Wed, 26 October 2011 15:56 Go to previous message
Jeff Johnston is currently offline Jeff JohnstonFriend
Messages: 215
Registered: July 2009
Senior Member
Good to hear you have things working. For existing projects you want to use the empty project. If you already have the source checked out or on your machine, then you create a new C or C++ project and specify the location of the source in the C/C++ New Project wizard. If you don't have the source checked out, you check it out and then ask to use a Wizard. Specify the C or C++ New project wizard and again specify an empty GNU Autotools project. This is mentioned in the Autotools User's Guide which you can access through Eclipse Help.
Previous Topic:Import autotools project
Next Topic:Problem with Linuxtool installation
Goto Forum:
  


Current Time: Sat Apr 20 04:13:22 GMT 2024

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

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

Back to the top