Member declaration not found

“Member declaration not found” is an error produced by the Eclipse static analysis tool (codan). If you get this error, but the compilation succeeds this is a false positive. Older versions of this tool are known to give some false positives, see for example this bug report. So I recommend updating Eclipse CDT to the most recent version.

Another thing that may cause this error is an unresolved include that prevents Eclipse from parsing a portion of your code correctly. Selecting Index -> Search For Unresolved Includes in the context menu of the project will give you the list of unresolved includes. See this answer for the details of how to fix it.

Here’s an example:

class C {
  void f(std::vector<int>&);
};

void C::f(std::vector<int>&) {} // Member declaration not found

The above example causes “Member declaration not found” error in Eclipse CDT even if you have <vector> included but unresolved (due to misconfigured include paths).

Leave a Comment