Using NetBeans with openFrameworks on Ubuntu – Part I

Using openFrameworks has been a very different experience for me, depending on which platform I was developing. Xcode after one long installation process was working nicely, sure. Only that sometimes I did not understand some settings that I had to do. More than one time internet told me how to solve a problem while I could not follow. The solution seemed not only system-related, but also IDE-specific. Not so much different (although Installation was more complicated) was openFrameworks with Visual Studio on windows.

Don’t get me wrong, I understand that the different systems have different needs. Also working with both IDEs is a fine thing (I exclude tries on windows not using Visual Studio). There are great solutions like adding addons in Visual Studio, which is very easy. The IDEs do help a lot. So all this is not about finding “the better approach” – rater “another” one. Because on Linux (Raspberry and PC) it was an all different experience: I was impressed with the elegance and ease of the building process. The openFrameworks developers had everything prepared. You in fact did not have to set up an IDE. You used whatever editor you want. And then you typed “make”.  Even adding an addon was dead simple – you just added it’s name to the file addon.make and used it in your project. When you were ready you typed “make”.

Screenshot from 2017-10-24 14_07_12

Of course I want to use an IDE on Linux also. Back then openframeworks supported code-blocks. Later openFrameworks moved on to support Qt Creator and – frankly – I was never able to set it up to a satisfactory status. And I did put quite some time in this using the help of the forum also.

During the whole time I always felt that the IDEs somehow seemed to ask for  additional effort to “support them”. Instead of them supporting the perfectly prepared structure and compiling process of openFrameworks. Every IDE obivously has it’s own files and settings that bring redundant information. This surely makes understanding what is happening not easier; and eventually – sooner or later – might bring additional problems too.  I felt that there had to be a solution for people like me: an IDE setup on Linux respecting and using the exisiting structure. an IDE offering help in coding, without bringing too much additional stuff to care about.

An unexpected find

A while ago a customer forced me to use NetBeans. Strangely enough – I was never a friend with NetBeans – it turned out to be a good solution for openFrameworks, too. In the following I describe how to set up NetBeans with any existing openFrameworks-Project. We’ll do it in a way that it completely respects and uses the native “make” approach and the associated files. So no additional NetBeans-specific settings for that.  Still in the end we’ll have an IDE that is as good as XCode or VisualStudio – at least for my basic needs.

First you have to install NetBeans of course. I suggest to use the “JDK with NetBeans IDE Java SE bundle” you can find get from oracle. You can install NetBeans as single Package and also run it with other Java/SDK Versions. If you don’t have a specific reason for that, the bundle might save you pain, though.  After installing, you will have to install the C++ plugin: Go to “Tools”->”Plugins”. This should be the only plugin you will have to install.

Screenshot from 2017-10-24 13_55_21

In the following Part, I describe in detail how to set up NetBeans with an openFrameworks project.