1

Netbeans marks any instances of forward_list in my C++ application with a red line (The error is Unable to resolve identifier forward_list). Netbeans also does not recognize any methods that the forward_list instances have.

My program, however, compiles just fine. Furthermore, autocomplete for #include <forward_list> works.

How do I tell Netbeans to recognize the C++ standard library while checking for syntax and for autocomplete aside from preprocessor includes?

dangerChihuahua007
  • 20,299
  • 35
  • 117
  • 206
  • 1
    Does this happen with other C++11 features like ``, `` or ``? – Yuushi Jan 30 '13 at 00:41
  • Sorry for the late reply. Yes, it does happen. For instance, after `#include`, `system_clock::now()` is unrecognized, and I am using the standard namespace. – dangerChihuahua007 Jan 31 '13 at 01:29
  • 1
    I'm not really familiar with Netbeans, however, perhaps this post will help (except changing from C++98/03 to C++11 instead of the other way around): http://stackoverflow.com/questions/12377358/unrecognized-command-line-option-std-c11-c-in-netbeans-7-2 – Yuushi Jan 31 '13 at 01:51
  • Thanks! That did! I had to go to Project -> Properties -> Code Assistance -> C++ Standard and then change the standard to C++11. If you answer, I'll give you credit :) – dangerChihuahua007 Jan 31 '13 at 02:26

1 Answers1

2

Mostly stolen from another post, but changing the standard to C++11 should fix this:

Project -> Properties -> Code Assistance -> C++ Standard -> C++11.

Yuushi
  • 25,132
  • 7
  • 63
  • 81