Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse shows errors but mingw compiled fine
Eclipse shows errors but mingw compiled fine [message #701623] Mon, 25 July 2011 10:42 Go to next message
Mike  is currently offline Mike Friend
Messages: 5
Registered: July 2011
Junior Member
Hello,

Is it a general thing that the Eclipses editor marks parts of the code like:

(just an example)

the header:

#include "BaseClass.h"

using namespace mynamespace; <- red line and saying "symbol could not be resolved"

class MyClass :
public BaseClass <- again "symbol could not be resolved"
{

};

But the namespace is declared in BaseClass.h and the class BaseClass within it.

I select the .cpp file , choose "build selected files" and mingw says " ...some lines... Build of selected resources is complete." - with no errors

But the errors are still marked in the editor.

How could that be ?


Re: Eclipse shows errors but mingw compiled fine [message #701734 is a reply to message #701623] Mon, 25 July 2011 14:03 Go to previous messageGo to next message
John McCabe is currently offline John McCabeFriend
Messages: 228
Registered: July 2009
Senior Member
On Mon, 25 Jul 2011 06:42:27 -0400, Mike <forums-noreply@eclipse.org>
wrote:

>Hello,
>
>Is it a general thing that the Eclipses editor marks parts of the code like:
>
>(just an example)
>
>the header:
>
>#include "BaseClass.h"
>
>using namespace mynamespace; <- red line and saying "symbol could not be resolved"

<..snip..>

>But the errors are still marked in the editor.
>
>How could that be ?

If you place the cursor within the text "BaseClass.h" and press F3,
does it take you directly to that file?

I'm not an expert on this, but the two issues that jump to mind are:

1) The project needs re-indexing; right click on the project in the
Navigator or Project Explorer and select "Index" -> "Rebuild"

2) The include paths aren't set up. Right-click on the project and
select "Properties". In "C/C++ General" select "Paths and Symbols" and
add include directories for the languages in the "Includes" tab.

Hope this helps.

John
Re: Eclipse shows errors but mingw compiled fine [message #703142 is a reply to message #701734] Wed, 27 July 2011 08:18 Go to previous message
Mike  is currently offline Mike Friend
Messages: 5
Registered: July 2011
Junior Member
Thanks.
Previous Topic:set up the environment
Next Topic:Conditional wizard page display?
Goto Forum:
  


Current Time: Wed Apr 24 14:33:12 GMT 2024

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

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

Back to the top