Skip to content

Eclipse CDT - Method 'endExpression' could not be resolved #359

@jvitku

Description

@jvitku

Hi, it seems that (from some, to me unknown reason) the Eclipse is unable to Index the single_include/catch.hpp file. Here is the simple example:

#define CATCH_CONFIG_MAIN
#include "catch.hpp"

unsigned int Factorial( unsigned int number ) {
  return number > 1 ? Factorial(number-1)*number : 1;
}
TEST_CASE( "Factorials are computed", "[factorial]" ) {
    REQUIRE( Factorial(0) == 1 );
}

It compiles and tests OK, but the Eclipse marks all REQUIRE lines as error and complains about Method 'endExpression' could not be resolved.

Tried:

  • adding catch.hpp into Preprocessor Include Paths in eclipse
  • enabled scalability under C++/editor/scalability to 500000 lines
  • rebuilding index, cleaning project, open/close Eclipse..

Setup:

  • OS X 10.8.2
  • g++-4.8
  • Eclipse Juno with CDT

More can be found in Google group

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions