C/C++ option not available in NetBeans

24,967

Solution 1

The answer provided by https://askubuntu.com/users/22949/eliah-kagan did not work for Ubuntu 19.04 with NetBeans 11 since the C++ plugin is not available under "Netbeans Distribution" when I tried it.

To install C++, I also had to select the Update Center labeled "NetBeans 8.2 Plugin Portal". It appears that C++ is not in the latest distribution yet, so I had add the legacy Update Center. enter image description here

After adding this update center, I was able to locate and install the C++ plugin as shown in the previous answer, and then create a C++ HelloWorld program in NetBeans 11 on Ubuntu 19.04 enter image description here

Solution 2

Install the C/C++ plugin in NetBeans.

In NetBeans, go to ToolsPlugins.

Then in Available Plugins, in the C/C++ category, check the box for C/C++, then click Install to start the installation.

Source: Enabling C/C++/Fortran in the IDE


If no update centers are enabled in NetBeans for installing and updating plugins, then you may see a completely empty list under Available Plugins. (Less commonly, if some are enabled but they do not provide the C/C++ plugin, then you may see some plugins but not that one.)

The Plugins dialog box, Available Plugins tab, listing no plugins at all.

The solution is to go to the Settings tab, look in the list of Update Centers, and check the box for NetBeans Distribution.

Selecting NetBeans Distribution in Update Centers in the Settings tab.

Then you can go back to the Available Plugins tab and the C/C++ plugin should be listed. You may have to click the Check for Newest button (though I didn't have to).

enter image description here

Share:
24,967

Related videos on Youtube

Mobi Zaman
Author by

Mobi Zaman

Updated on September 18, 2022

Comments

  • Mobi Zaman
    Mobi Zaman almost 2 years

    I upgraded Ubuntu 14.02 to Ubuntu 16.04 and realized that NetBeans was no longer working after the upgrade. So I installed netbeans again from the command line:

    sudo apt install netbeans
    

    But after the installation, when I opened NetBeans, it was still not giving me the option for making a C/C++ project.

    no C option

    Can anybody please help with this problem?

    • Aquarius Power
      Aquarius Power over 4 years
      ubu 18.04 , netbeans 11
  • karel
    karel over 6 years
    It worked in my Netbeans but after installing the C/C++ plugins and restarting Netbeans I had to update all my plugins and restart Netbeans again or else my C++ program would compile successfully but it wouldn't run. I updated the Netbeans plugins by clicking on the update plugins notification that I received in Netbeans.
  • Eliah Kagan
    Eliah Kagan over 6 years
    @karel Was the problem running the program just that NetBeans wouldn't debug or otherwise run it, or that the program would actually not run even when attempting to execute it outside of NetBeans?
  • karel
    karel over 6 years
    My C++ source code was copied from a program that I had already compiled and executed successfully in the terminal so I knew what output to expect if the program executed successfully in Netbeans.
  • Eliah Kagan
    Eliah Kagan over 6 years
    @karel Yes, didn't figure your program had a bug. Instead, I'm concerned that NetBeans may actually have caused an executable that was incapable of running to be produced. Especially if that happened, I'd consider warning about the problem in this post. That's why I was wondering if the program emitted from the build NetBeans controlled was able to be run from outside NetBeans.
  • karel
    karel over 6 years
    I didn't compile it again after I updated the Netbeans plugins. Instead I clicked the green Run arrow to run the executable file that I had previously compiled before restarting Netbeans and this time it ran successfully.
  • FiddleStix
    FiddleStix over 4 years
    Thanks, this is not at all obvious from any of the official docs.