Can we easily compile from OSX/Linux to Windows?

I am in a weird position. I am starting a project that I want to develop on OS X or Ubuntu, but the final version must be run on a windows machine. Is this easy to do in openframeworks? What do I have to look out for while developing that will make this cross compatibility an issue?

I think in processing this would be pretty possible, and I am also more familiar with that library, but I am afraid processing will be too computationally slow for what I want to create.

Hi, RealHuman.

How about using the WSL2 for windows10?
The WSL means windows subsystem for linux.
Ubuntu is possible to install in it.

I’ve never heard about that, but I’ll look into it! Thanks

Do you have experience with WSL and openframeworks in the past?

wsl can’t run opengl as far as i know so it won’t work i think

porting projects from one platform to another is usually quite straight forward, there might be some small things you might need to modify but most things should run right away.

i would recomend to test the project in windows relatively often instead of testing only once at the end to not have any surprises but other than that it should be fine

if you use the project generator in windows to generate the project for visual studio it should regenerate the project files with all the addons without problem

Thanks for the info arturo! That’s good to here.

I have a windows virtual machine so testing often to see if it compiles should be fine. I am a little confused by what you mean about generating projects with visual studios. Im not very familiar with windows development or visual studios, so pardon my ignorance. Take a ubuntu/osx openframeworks or c++ project, plug it into visual studios, and it will create all the necessary addons to be run on windows? That sounds incredibly convenient.

Hi, after you have a working install of openFrameworks on windows (thus, you have installed Visual Studio, and you can compile and run any of the examples) you will only need to put the project you’ve developed on Linux/OSX in the windows machine, and update the project using project generator, then you should be able to open the project in Visual Studio and compile… It is quite straight forwards.
The one thing you should be careful with are non-core addons (addons that dont come as part of the openFrameworks download package), as there are some that will not run on any platform or behave differently. Make sure you’ve also copied the addons to the windows install.
What I’ve found very useful for this scenario is to have my project in github, when ever I update it I then just pull from windows and recompile. No need to manually move stuff around.

actually, as openframeworks supports mingw32 maybe you could be able to compile for windows from linux, but i still have to investigate this stuff:

Oh awesome roymacdonald, that sounds quite simple. I’ll give it a shot. So I really just have to watch out for additional addons? Have you done this yourself?

Nice, ill look into wingw32 as well.

yes I do it quite often.
yes, additional addons are what you would usually need to take care of.
All of OF’s code is multiplatform so if you code something with no addons other than the core addons the code should be a 100% cross platform.