Launching C++ Openframeworks app on multiple platforms

Hello,

I made this: http://student.howest.be/bastiaan.andriessen/20132014/EXP/ application a few months ago in XCode 5 using openframeworks and works just fine on Mac. But I want to be able to launch the app on p.e. Windows.

If I download the .zip on Windows, I get access to the folder with the .app file and the data-folder with all the sourcefiles just like on Mac but the .app file appears as a folder instead of an executable app. So my question is if anyone knows how to build the app so it’s executable on other platforms than Mac or is this impossible?

Thanks in advance!

Generally speaking, you cannot run a OSX application on Windows: different operative systems use different “types” of executables. You’re probably familiar with the fact that i.e. there is a Photoshop version for Windows and a version for Mac or that some games are available only for a specific platform.

The only exception to this general rule are scripted and virtual machine based applications: this kind of software relies on a specific environment installed on the OS (and again: different OS need different versions of the environment) that interpret the script or binary they are fed. This normally has a cost in terms of performance

OpenFrameworks is C++ based, so it creates “real” native applications that will run on the OS they are developed for. That being said, OpenFrameworks itself is multiplatform: you can easily install a OF development environment on WIndows, copy/paste the source code of your Mac developed application in a new project and, in most cases, it will compile with no changes. (if you’re using external libraries/addons, some porting effort might be needed).

Finally: you see the .app as folder because it actually IS a folder: OSX shows you .app as files, but they actually are folders containing an application and its resources. You can easily verify that using Finder or the Terminal :smile:

Ok so basically I can’t build my app on my Mac to run it on other platforms? But I could make it work by p.e. pasting my code in VirtualBox? What app should I use to compile it with then? Could you give me some more info about compiling my project in Windows?

Thanks for the help so far and sorry for the overload of questions now.

yes a Mac application run only on Mac and the same happens for Windows and Linux: this is a general rule, it does not apply only to OF.

Of course you can emulate an operative system under another one: inside a virtual machine (i.e. using Virtual Box) you can run applications and development environments for the emulated OS.

You can find instructions OF Windows development on the download page of the website: http://openframeworks.cc/download/
In the Windows paragraph you’ll find 2 IDE setup guides: one for Code::Blocks and one for Visual Studio