You are not logged in.

#1 2016-10-23 20:00:29

Feldmarshall
Member
Registered: 2016-04-21
Posts: 4

[SOLVED]Netbeans C++ code assistance not working properly

Hi!
For a long time I had problem with netbeans C++ code parser failing to process some C++11 code. The most basic example: using auto to determine type of iterator and calling method on element in a conteiner, for example:

(...) // includes and so on
    std::vector<my_class> vec;
    for(auto i = vec.begin() ; i != vec.end() ; ++i)
    {
         i->my_method(); // this would be not recognized and underlined with red wave underneath
    }

Code would compile good, and code completion worked in most parts of the code, so It was not a deal breaker. I searched for solution when I first encountered the problem, but I didn't find anything. After upgrading to NetBeans 8.2 I gave it another try and found an old post in StackOverflow http://stackoverflow.com/questions/2332 … 7#23499517. I tried solution from there (downloaded Oracle JDK from their web page and run netbeans with --jdkhome pointing to it) and suddenly the problem was gone. I tested it on two Arch installs (i686 and x86_64) and in both cases the problems were miraculously solved.

I'm writing here, because it took me months to find this fix and it might save someone a lot of time. Also please write if you had this problem too - if this is a common issue it might be worth to add corresponding entry on wiki page.

Offline

Board footer

Powered by FluxBB