Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I was hoping you can help me solve a problem I have. Since I updated to 12.04 version of Ubuntu I cant call libraries in C++ netbeans projects.

I get this message in netbeans when I include library in C++ program:

There are unresolved include inside <iostream>

I have tried to uninstall netbeans so I can reinstall it but when I run uninstall.sh I get critical error message:

share|improve this question
    
It seems that the error message from uninstalling netbeans didn't make it into your question. You may want to edit your question to add this. –  Eliah Kagan Jun 28 '12 at 10:04
add comment

2 Answers 2

up vote 1 down vote accepted

Try uninstalling the g++ library or whatever c++ library you are using.

For g++,

remove it completely like

sudo apt-get --purge remove g++

Then do a sudo apt-get update to update all source

reinstall the library

sudo apt-get install g++

Clean Up user directory : (Source)

Open netbeans, open netbeans About dialog. Have a look what is the path to your userdir.

delete it (backup if you'd like) and start neat beans again.

share|improve this answer
    
Thank you very much it worked –  depecheSoul Jun 28 '12 at 10:32
    
it worked for me as well, thanks! I voted your answer, but the site doesn't accept my vote... –  lucacerone Jul 3 '12 at 17:00
add comment

This problem stems from changes they made starting with 12.04 where the path to the include folders is different. Netbeans hasn't been updated to automatically find this new path system, so you're code assistance and project paths need to be changed.

To do this as late as 14.04, open Netbeans, go to the preferences dialog, and the C/C++ tab. There you will find a code assistance tab with a list of absolute paths to certain folders. Add /usr/include/c++/4.8 to the list, finalize that and close preferences.

Then, on the project you are working on, right click on the project icon in the side bar and go to the very bottom to find properties. Click that, then on the C or C++ Compiler option, which ever one you're using, and there should be an Include Directories line. Click the ellipsis on that line, and add the same path there.

Once you have that all closed up, your project should have proper code completion and compile correctly. I hope this helps.

Digital Fruit
Our Blog

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.