NetBeans 6.8 marks keywords as fault - c++

I have just installed NetBeans 6.8. on Ubuntu 10.04 and it marks c++ keywords such as "using" or "namespace" as a fault. I checked that it compiles with g++ and I found an answer to that already here, but there it was a bug in Netbeans which had been fixed via updates within a few days. When I try to update, it tells me, I have the latest version...no surprise...
If I define me a class and want to use it in the main file, it does neither work. The header file of my class is included ;-)
And actually, when I write something like myClass::myMethod(int n){ myClass::Variable +=n;} it does not even accept the definition of n in the round brackets...
Does anybody have an idea?

The latest version is 6.91. You might have to download it again from netbeans.org if you're having issues with the update. Package manager may not have the latest version.
When you say you have errors are they when compiling or is the IDE underlining them in red before you compile? The IDE tries to be helpful but it's not very accurate sometimes.

Related

Syntax highlighting and code inspection in CLion stops working after including anything from standard library

The problem started happening after upgrading GCC to version 10 on Ubuntu 20.04.Basically my code gets highlighted and inspected fine until I include a standard library header (string for example). Sometimes when I remove the include line the highlighting comes back and sometimes it comes back only if I restart CLion after removing the line. The code compiles fine. I already tried reinstalling GCC, CLion and whole Ubuntu and the problem is exactly the same. The problem is not consistent for all the headers because cstdint works fine and doesn't break anything but string, map and iostream do. I don't have any external plugins, it's a totally fresh install of the newest CLion and Ubuntu. Going back to GCC-9 fixes the problem, but GCC-10 just doesn't seem to work.
Trouble in CLion happens sometimes when the software detects that it uses too much memory. The only solution that I know is to close some files and reopen the one on which you want the functionnality.

Eclipse with CDT not compiling at all

I have been trying out using Eclipse CDT for a course I am taking. Previously I have been using Visual Studio Express but since that requires me to be online and I have to use the IDE+compiler offline, I switched to Eclipse + Cygwin GCC.
Now everything was working prefectly, until I got an error about file paths in my make file. After reading some of the posts online, the issue seemed to be that Cygwin's make does not resolve absolute Windows file paths because of the ':' symbol and confuses it with a new target definition. The proposed fix was to download a fixed make file. I diligently did so and the programs would compile fine.
But after I went into the first debug session, everything froze. I aborted eclipse and tried a clean build but now the compilation wont happen AT ALL, which is very weird for me.
I can't find a post for a similar problem so I am really stuck now. I was currently working the assumption that my CDT may be corrupt or something so I downloaded Eclipse Luna just today and tried building using that, but no joy. Even a fresh project in a new workspace wont compile.
Appreciate the help in advance.
Did you try redownloading Eclipse? Sometimes Eclipse gets a fatal error glitch that makes it unable to compile anything. I've had this problem before, the only way i was able to fix it was to uninstall and re download the latest version. If this doesnt work, try switching to Bloodshed Dev C++ or codeblocks.
So it seems like an issue with the new make (v3.80). upgating it to v4.08 fixed the issue of not building.
Version 4.08 however does not fix the Windows file paths not being recognized properly and treated as a target definition. I am still getting the multiple target patterns. stop error.
EDIT: Found this on Stack overflow to solve the issue... should have searched better previously.
Very simple application fails with "multiple target patterns" from Eclipse

Eclipse CDT Plugin keeps giving inexistent errors

I prefer Eclipse as IDE, even though I need a plugin to use it for C++. But somehow the CDT plugin marks errors where none are, like this:
It tells me that the function 'to_string()' could not be resolved, even though make all runs without problems.
I already tried the solutions given in the accepted answer to this question, but with no effect
Simply rebuild the CDT index. This will remove any wrongly reported errors.

Eclipse CDT crashing when trying to index header files

I'm successfully cross compiling C++ code to run on a raspberyy pi from a Windows 7 machine through Eclipse Kepler SR1. Although the compilation is successful, there is a problem with the error parsing on the editor. It's showing red lines (errors) for functions/definitions such as cout, endl, string, etc.
When I click on Project->C/C++ Index->Search for Unresolved Includes I can see that it complains that bits/c++config.h, bits/c++allocator.h and similar files are unresolved. So, I did a grep and found these and included the director under Project Properties->C/C++ Build->Settings->Tool Settings->Cygwin C/C++ Compiler->Includes and Eclipse just crashes. I noticed that it generates the attached log file. This seems like a nasty bug or a huge error on my part. Is there a way to resolve this issue?
Here is the error log file.
This answer not pretend to be a solution. Just a set of thoughts
There are many-many bugs in CDT. Try latest development versions in hope that someone fixed your issue.
Update sites (to install/update via "Help"->"Install new software"->"Add..." dialog):
http://download.eclipse.org/tools/cdt/builds/luna/milestones (for Luna milestones)
http://download.eclipse.org/tools/cdt/builds/8.4/nightly (for 8.4 nighlies )
Or download directly from CDT page.
You can also check their Bugzilla and forums if there are bug report for that issue and solutions/workarounds. And surely you can check out CDT source code and actively participate in bug fix ;)
Personally, I use latest milestones, because of indexer: 8.4 better understands C++11.
Hope it helps.

Netbeans is not highlighting unresolved identifiers

I've been working with Netbeans on Mac OS for the past few months (in C++) but have now moved to Ubuntu 12.04. I'm compiling via command line and just using Netbeans as an editor because I like the code assistance and things like that that it has. Normally it seems people want to disable code assistance and highlighting but in my case, they are not working and I don't know why. All the boxes are checked under the Editor>Highlighting tab. When I deliberately misspell a variable it does not complain. Syntax highlighting works fine. Is there some other thing I need to install?
I apologize is this is a very simple thing but googling and searching docs has not helped since it seems everyone is concerned with the opposite problem.
Does NetBeans use clang for static code analysis? Maybe you need to install it.