with 0.061, we’ve moved to a compiled lib – see http://forum.openframeworks.cc/t/0.061-release/3071/3
for xcode, this means that the openframeworks projects are seperated from the library, leading to faster compile times and smaller directories for openframeworks projects.
While this post is just to explain how the setup changes, it actually works very smoothly on mac to open up an example, compile it and run, and you don’t really need to know what’s changed. but some of you might be used to looking at openframeworks code (poking around the headers, for example) and want to explain where that code has gone.
On windows / linux we use “meta” project files that hold together two projects, but on xcode, this is done slightly differently, since xcode allows you to embed one project as a dependency to another. It looks like:
what you’ll notice is that the openframeworks source code is now no longer in a given example project. if you want to poke around or look at the OF code, you can double click the blue icon “openFrameworksLib.xcodeproj”. This will open up the project that builds openframeworks (you don’t have to do this, just if you are curious. OF should build automatically if it’s not already built the first time).
double clicking it, you can see the project that builds OF here.
if you make any changes to OF, and compile the example, it will know that the project it’s dependent on (openframeworksLib) is out of date.
hope this is helpful info!
Here’s a template project for xcode. Place the unzipped project folder in:
To use the template, navigate to File>New Project… then select the Other category.
Save the new project in the usual Apps/Examples dir of the openFrameworks installation (or another subdir of Apps).
The project template will automatically make the product name match the project name.
Wow - that is very cool - it worked perfectly - we’ll have to bundle that with the next OF release.
In case people need to rename an existing project here is how you would do it:
Step 1 - Copy an existing example project by copying and pasting the whole folder.
Step 2 - Rename the folder to match the name of your project - I chose "myNewApp"
Step 3 - Inside your project folder rename the xcode project file to the same name.
Step 4 - Now open your renamed xcode project file. In the side bar cick on the arrow by Targets to expand and show the target ( here it is currently called emptyExample ).
Step 5 - Right click or control-click on the current target ( emptyExample ) and select rename.
**Step 6 - Rename the target to the same as your new project name.
**Step 7- Almost done - Xcode doesn’t refresh the .app in the sidebar ( emptyExampleDebug.app ) so go to the build configuration drop down - change it to Release then back to Debug. Once you do that the .app should be updated.
Now the app reflects the new project name.
And when we run the app it shows the new project name.
Hope its helpful!
It works great this example for me Zach, thanks, but what about if i move the complete folder of the emptyexample to another place in my hard drive on mac, it doesnt work, and also im trying to compile this litle example of basic shapes and i can make it!! im not a master in open frameworks and in c++ to, can you may be give a litle explanations to how to start a new project from cero, no from the examples, and how to read a external example like this one that i put here!! it will be really great for me!! thanks for your time and patience guys!!!