0

Probably going to be deleted but I can't post 3 questions for this...

  1. Netbeans not working: Netbeans Screen Shoot With Output Error

Ok, so I don't know what is happening, but I can't use NetBeans at all. Anything I would do, the program says RUN FINISHED and I won't work... I can't even input and output an integer...

Input/Output a variable

The second problem with NetBeans, you can already see in the first picture, the methods, and some words are underlined with red for no reason, the code works perfectly on code blocks!

  1. Codeblocks indenting is working like crap if I write:

    int main()

and then type { and press enter I get this: this

And I have to press one more time to enter for the second bracket to go down and press Up Arrow to go back on the line and press Tab, this is horrible.

If you know any IDE I can use, without spending an hour to install them, that would be great, and maybe looks decent and not so 2002 like some things I have experienced since I got Linux...

slava
  • 3,887
SKREFI
  • 1
  • KDevelop en QtCreator are probably the most modern looking and they do not come with the java bloat of netbeans and eclipse. – Eelke Feb 06 '19 at 17:21
  • Ok, I will try KDevelop, and QtCreator is for, well, QtC++ and I am doing only console applications (I mean algorithms)! – SKREFI Feb 06 '19 at 17:40

1 Answers1

0

The eclipse-cdt package contains Eclipse features and plugins that are useful for C and C++ development. To install eclipse-cdt in all currently supported versions of Ubuntu open the terminal and type:

sudo apt install eclipse-cdt  

fos4cdt is an Eclipse plugin to format C/C++ source files on any save action. When you press Ctrl+S or click the Save button, the plugin formats saved files automatically. You can enable/disable auto formatting by a preference page and using shortcut keys.

fos4cdt can be installed in Eclipse from the Eclipse Marketplace. To open an Eclipse Marketplace window in Eclipse select Help -> Eclipse Marketplace -> search for fos4cdt -> click Browse for more solutions link to open http://marketplace.eclipse.org in a new tab in Eclipse -> click the house icon underneath the Eclipse icon to go to the fos4cdt download page.

enter image description here
before code formatting

enter image description here
after code formatting

I tested the fos4cdt Eclipse plugin against UniversalIndentGUI from the Ubuntu repositories. fos4cdt does a better job of pretty formatting code than UniversalIndentGUI. UniversalIndentGUI indents code logically, but except for fixing the indentations it does not do any other pretty formatting.

karel
  • 114,770
  • I have tried it... It won't run, I get this error message: An error has occurred. See the log file /home/skrefi/.eclipse/org.eclipse.platform_3.8_155965261/configuration/1549474619434.log

    And first this in the CLI: _Failed to load module "canberra-gtk-module" _

    Decided, this time, to google that (actually before posting this I didn't use CLI and didn't see that error) and I reached this: https://askubuntu.com/questions/342202/failed-to-load-module-canberra-gtk-module-but-already-installed

    It is still not working, I can't even run Eclipse...

    – SKREFI Feb 06 '19 at 17:37
  • I'm using Eclipse Version: Photon Release (4.8.0) in Ubuntu 18.04. You are using Eclipse Juno 3.8. – karel Feb 06 '19 at 17:53
  • And how do I get Photon Release? – SKREFI Feb 06 '19 at 20:58
  • Eclipse IDE for C/C++ Developers is harder to learn to use than Code::Blocks and more full-featured. – karel Feb 06 '19 at 21:46