Starting from scratch

Hello all

For a while I was playing with oF. I downloaded the FAT version, played with the examples
over there and it was all fine, modifying the example folder and doing my stuff went good.
But things change when I wanted to create something from the scratch, for example
I downloaded some addons or code examples from Memos website that I cant run thus
cant see how they work.

Is there a tutorial avaible for Mac users that teaches how to start a project from start ?
Thanks.

see the “readme” file in OF for the section called “if you want to make a new project”

with memo’s projects, they might work in 0.06 but not in 0.061 – you might try downloading both to see. In 0.061 we’ve altered the openframeworks setup a bit so 0.06 projects wont work right away (but if you copy source code into a project in 0.061 it should be fine).

in general, making a new project involves duplicating a given folder / example and renaming it. See the “readme” for more info about this.

the most tricky thing is addons (additional libraries, etc). if you are trying to get source code to work that calls upon opencv or xml, etc, you can duplicate the allAddonsExample and replace it with the source you care about.

if you are still having trouble, feel free to upload a zip of the problematic project and we can walk you through it.

hope that helps -
zach

The thing is, duplicating example folder and using it is really easy.
I want to learn how to add addons or libraries on my own for a project I am working.
How should I do the linkings and includes ? Etc.

I am trying to get Memos ofxSimpleGuiToo stuff, I added the folders to correct locations by looking to install.xml file but still having errors like:
/Users/tolgainam/Projects/oF/of_FAT/apps/addonsExamples/ofxSimpleGuiToo/src/testApp.cpp:2:0 /Users/tolgainam/Projects/oF/of_FAT/apps/addonsExamples/ofxSimpleGuiToo/src/testApp.cpp:2:27: error: ofxVectorMath.h: No such file or directory

same for #include “ofxSimpleGuiToo.h”

ah I see… I’m sorry, it’s a good indication that we should improve material on addons including per compiler specifics.

in this case, you a missing the “vector math” addon – you can copy the vector math example (from the FAT package) and replace the source with the source you want to compile. alternatively, the vector math .xml file should give you a list of the files you need to add to your project (ie, essentially take everything in src and add it to your project).

on xcode, you can actually drag a whole folder of code in, and it will both add the code to the project and add the include path (other IDEs you have to do this manually).

so, for xcode, the steps are:

a) drag the src folder from addons/ofxVectorMath into your xcode project, choose recursive if it asks you.
b) compile.

other IDEs (non mac), don’t have such a nice drag and drop feature, so it’s

a) add files to project
b) add include paths to project settings for debug and release
c) compile

you can always open up an addon example and compare it with your project to see what the difference is.

more complicated is linking, but for mac it’s still, drag and drop. for cb / vs, you need to do this manually. today I’ll try to take some time out and walk through doing this on all platforms, and add it to the setup guides.

hope that helps!
zach

Well,

Works great now if I use your method with the addons that comes with the fat package, I just duplicated a new empty project and added a random addon from the addons folder sources with drag and drop and it works very good. I think it will be work same with the other stuff I will use too.

But again I am tryign to use Memos simplegui addon and it gives lots of errors during compile. I solved the include problem of mine but there are several other errors.
I am adding the project file so maybe you can check.
Simply, I followed the tutorial on vimeo that about starting a new project except that I changed the project files withe the memos simplegui ones and using the method above I added the src’s for addons. And voila it does not work (:

http://www.tolgainam.net/myApp.zip is the file.

But a guide will be very useful for newbies like me who are not using XCode. Actually apart from the C++ tuts on the web it will be nice for a quick walkthru about how to include files
general in C++ and oF covering the addons / libs.

And 1 more note, when I downloaded the addon from svn, it has no project file associated with it, maybe it will be nice for ppl to have also a project file to work with.
Thanks

I think you are very close, just missing the

  • ofxMSAInteractiveObject
  • ofxXmlSettings

addons that this addon needs (there is a requires section in the install.xml that should show you inter-addon dependencies). Can you try to add them?

take care,
zach