This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 164891 [details] Unable to resolve identifier string. 1. Install NB 8.2 patch 2 with normal C++ plugins. 2. Create C++ app. Accept all defaults. 3. In main.cpp add simple std::string variable. Problem: "Unable to resolve identifier string." Code assistance is broken for the simplest possible task. See screenshot. The sample app builds without error.
Which GCC version you are using? Which Linux you are using? Different GCC versions uses different C++ headers and default C++ standards.
Created attachment 164893 [details] C++ code assistance headers
(In reply to soldatov from comment #1) > Which GCC version you are using? Which Linux you are using? Different GCC > versions uses different C++ headers and default C++ standards. GCC 4.8. Same GCC with same headers work correctly under NB 7.4. See supplemental attachment. Settings were imported directly from working NB 7.4 during installation. No intervening changes were made to OS or compiler. uname -a Linux 4.4.0-87-generic #110~14.04.1-Ubuntu SMP Tue Jul 18 14:51:32 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS Release: 14.04 Codename: trusty
You have invalid compiler settings. Why did you add /usr/include/... paths? Also I see absolutely empty 'Macro Definitions' table. I think 'Restore Defaults' button will fix your compiler settings (Options > C/C++ > Build Tools tab)
You are correct. Setting the defines by the default button fixed the immediate problem with the std namespace. Removing the extra /usr includes fixed other problems in my projects. As I said, these settings were copied from a working NB 7.4 instance and were somehow needed to get it working. For 7.4 I recall that these settings were cribbed from a forum post when sensible settings did not work. The default define button is very helpful. Better still would be if NB could propose what it needed for sensible header file defaults for the C++ compiler. Good work. Thank you for your help.