Why is it so tricky installing addons?

I’m going to take the chance to ask this possibly annoying question but why is it seemingly so tricky to install addons?

I’m a beginner and I have a lot to learn and I’m sure eventually I’ll understand but I went through one video tutorial so far that did not help. I’ve viewed another tutorial that I still need to test out. However neither of these videos answered the question oh “Why?” In a sense I’m probably asking a question that deals with the nature of C++. Can anyone explain - even in broad terms - why addons are installed the way they are? Could it be improved?

Have you tried to use the project Generator for adding addons to your project ?

You have to keep in mind something. The people who created openFrameworks did their best to make something that used to be pretty complicated, become easy to use for non-specialist, but underlying are still pretty complicated thing, so if you want to understand what is hidden behind what oF does for you, it’s a fairly complicated journey (depending on what’s your background I guess, but can help you learn much about other domains)

Your question kind of lack of details : you’re not saying what IDE you are using (trust me, using Visual Studio is probably bitchier than XCode, but from your other posts you seem to be using the latter), nor what video tutorial you’re mentioning. I think if you want to be more constructive, you should explain in what adding an addon is a tricky process, or even better, explain in your own words how you had to proceed, so it might be helpful for other people in your situation. People more seasoned tend to forget some of the complicated steps they have to go through as it becomes natural to them, so a fresh point of view might be useful for further explanation.

On the other hand, for yourself, you should probably try to have a horizontal approach to your problem : if you have no idea on how to use XCode, don’t know anything about C++, maybe you should look for resources that explains the basics of how to use the tool you want to use (it’s like if you were asking why it is so complicated to use oil paint in a course about nature morte… If you’re lucky someone will tell you the basics of oil painting, but maybe you could research the subject as well)

And in a nutshell : every .cpp file you have are going to be compiled as object files, .h files are meant to tell other objects “this guy (other object) over there can do that and that and that,… , so if you need this function, you’ll know it exists and who to look for”, and when everything is compiled as objects, a second pass called the linker is going to to make the link between all the function in all the object, and pack everything in a binary that your computer can run. But for all this to work, you need to tell the IDE the folders in which the files are, the libraries (big chunk of objects) you’re going to use, and so on. How you tell your IDE depends on which IDE you’re using.

As mentioned before, the project generator is here to ease the process. And I’m sure if you have ideas to improve the whole process, suggestion or tutorials could be helpful to everyone :slight_smile:

1 Like

Thanks for the response. I have not tried the Project Generator. I will do that. I am using the most recent version of Xcode and was attempting to install the ofxGUI the other day using this tutorial - http://vimeo.com/22531953

That tutorial refers to an earlier version of Xcode and oF so that may have been a part of the problem. I’m going through some other details right now and may attempt to use the video tutorial here - Basic Tutorial on installing Addons

I’m also reading instruction in the Mastering oF book. So maybe that will resolve some of my confusion. I think my biggest concern was that the two video tutorials skip the “why” part. I am interested in understanding C++ more thoroughly so that’s why it I was bothered that neither tutorial offered in depth explanation… but I’m also reading some C++ text so maybe I’ll get it… eventually.

However your broad overview helps a lot. Thanks for that. That’s definitely the direction I’m trying to move into. If I have any other questions after I read/view these other tutorials, I’ll follow up.

Also you can use OFPlugin, easy to use. Check out these links



If you are using OS X, @admsyn’s OFPlugin is definitely a convenient way to pull addons into a project.

Yeah, I’ve actually tried to use that. I believe it’s installed correctly but if a menu option called “OF” is supposed to appear, that hasn’t happened. So I’m not able to use it.

@estevancarlos yes an OF menu item should appear after installing (and after you’ve restarted Xcode). Are you using Xcode 5?

To try to answer your question: It’s quite tricky for openFrameworks to streamline the process of adding addons, since 1) the process is pretty IDE-specific and 2) there are many ways C++ code can be passed around.

For instance, code can be passed around as:

  • Straight-up C++ code files with no dependencies (by far the easiest, but not always possible)
  • Static libraries, with different .a files for different platforms (OpenCV comes this way, as do many large libraries)
  • Dynamic libraries
  • C++ files / libraries which depend on other libraries

… so it’s quite different from something like, say, Javascript where you just kinda need to smoosh some text files together.

The process of importing third party code can actually be a pretty difficult problem for C++ programmers in general, not just for beginners in openFrameworks :slight_smile:

Depending on how deep down the rabbit hole you’d like to go, take a look into what static libraries and dynamic libraries are. To answer:

Could it be improved?

Yes, most definitely. C++ is showing its age in how cumbersome the process is. There’s a proposal for “modules” from Apple that’s due to arrive in a future version of C++. The linked PDF / presentation is a pretty good overview of the stuff I’ve outlined above (and more).

1 Like

OFPlugin wow my mind is blow, thanks @admsyn

Thanks for further clarifying.