[Ubuntu/Codeblocks] getting examples to work

Hello everyone,

I’m totally new to oF and C++ in general. I’ve compiled oF using the ‘stable’ branch on Github and also the projectGenerator. Also I have been able to install Codeblocks.
First thing I did was creating a test-project using the projectGenerator and everything seems to be in place: addons.make, config.make, Makefile, test.cbp, test.workspace. After opening the project in Codeblocks I compiled my test-app and it worked. Fine so far.
Now I’d like to try one of the examples in the ‘examples’ folder. However, though there are source-files I couldn’t find any .cbp files as well as no Makefile, config.make and addon.make.
How is this supposed to be handled using Codeblocks under Linux? From some screenshots made under OSX I could see there XCode-project filles that should make it easy to open a certain project in XCode. Am I supposed to create the project-files resp. Makefile, addon.make and config.make manually? Or is there some trick that does that for me?

Thanks any hint in advance,


Hey Stefan,

It doesn’t look like any of the project files for the examples are included in the git repository. They are however in the tarball on the downloads page (http://openframeworks.cc/download/) so if you just want to get them up and running, you could use that instead.

simply use the project generator to create all the files needed for codeblocks and makefiles…as you create a testApp .

Ah! Thanks very much for that hint! Indeed, the missing files were included in the tarball and I have been able to compile the example that I wanted to try out. Cool!

Well, that’s what I hoped to be possible. However, I fail to see how it can be done with an already existing project, i.e. source files are there but the required project files (Makefile, config.make, addons.make etc.) are missing. I’ve already realized I can import files into a project created within codeblocks but that doesn’t create the missing ressources for me. Did I miss something?

if you have ProjectGenerator just point to the folder,
example: you want to create all project files for ‘example/graphics/color’ example, then point to ‘graphics’, enter the same name of the project
in this case ‘color’
(if you cange it or type wrong, pG will generate instead a new one)
and press generate.
Already source file will be untouched and all needed file will be generated, as described here, i think the tutorial need some words also on this. If you don’t understand something, ask again.

Thanks very much! That worked. Indeed it’s more convenient to use the ProjectGenrator to generate the missing files than copying them over from the tarball.

yes, but with tarball every example is ready to build. tarball v. is smarter and simpler of course but if you want to develop some code inside OF lib classes and you want to contribute to the comunity effort, git is the solution, and also if you want mantaine history of your projects git is also very useful.

I am quite used to working with GIT (I’ve had some troubles, especially when working with branches. But so far I’ve always been able to resolve conflicts). I think I can live with that slight disadvantage of not having the project-files in the examples, especially since you showed me the work-araound.
Thanks once again!