Porting Project from Windows to Linux

Hello All,

I need to run some linux commands on my OF Project that I built in Windows using Visual Studio 2019. I have successfully installed OF on Linux as well as the project generator. I am successfully able to run the examples in the linux terminal with commands ‘make’ and then ‘make run’.

To port my project I have done 2 things to no avail unfortunately:

Method 1 - Create a new project in the Projector Generator with the necessary addons, and then copy the source/data files to that project.

When I did this the linux terminal spitted out some syntax errors. for whatever reason linux doesn’t like the functions ‘FreeConsole();’ and ‘Sleep(50)’. To fix these errors I just got rid of the ‘FreeConsole();’ command and changed the ‘Sleep(50);’ command to a lowercase sleep (The linux terminal recommended I do this).

After fixing the syntax errors and running the ‘make’ command in the linux terminal, I was able to successfully compile the project with the ‘make’ command, but unfortunately when I try to launch it with ‘make run’ it takes forever, and doesn’t launch.

Method 2 - Copying the Project folder from windows and then using project generator to update it to Linux platform.

When I did this, after fixing same syntax errors as before, Same result. I can compile, but not launch.

Anyone have any clue as to what is going on?

Kind of boring answer, but can you compile any of the examples on Linux? I would check this and then check each add-on (try generate a project with the project generator for an example in each add-on). Go bit by bit. Some add-ons may not be cross platform.

You could then try moving your code bit by bit to a new project with the add-ons (if they all compile on linux). The output of the console will likely tell more also and could let you know exactly what is not working.

I’ve tried the myEmptyExample and the Polygon example and they both work. I’ll try going bit by bit tho. As per the addons, I’m only using ofxGui and ofxXmlSettings which I’m assuming are cross platform seeing as both project generators give me the option to add them to the project.

I had a couple of projects in the past that some shaders tooks ages (-6-8 minutes) to compile during the setup process using intel integrated cards, while in windows they took just a few seconds.

Either way, I would recommend to write the ofLog to a file and set it to verbose, to check where is getting stuck.