Standalone Openframeworks application for linux(ubuntu)

Hello guys!! :slight_smile:

Is there a way i can package an application with all the dependencies so that i can run it on any system with ubuntu-x64 configuration?

For a fresh ubuntu install it normally requires me to follow some of these steps:

  1. Download Openframeworks(OF)
  2. Install ubuntu dependencies - https://github.com/…/s…/linux/ubuntu/install_dependencies.sh
  3. Further compile entire frameworks(Which takes full cpu usage and about 30 mins on a i5 comp)
  4. Compile & Link an app using this framework.
  5. Now run the executable.

Doubts:

  1. How can i skip Downloading & Compiling OF - each time and rather just create libraries which i can install/copy onto a fresh ubuntu install?
  2. How do i create and where do i best place “.o” or “.a” or “.so” library files?
  3. how do i package this as a single standalone-application?

I’ve tried compiling Openframeworks with it’s examples, examples work fine. Further, I copied entire compiled-directory on a similar system running fresh-ubuntu installation.But, Compiled executables don’t work anymore on this fresh installation! I’m not quite sure about the right approach here…

Any help would be much appreciated.
Thanks in advance!

you should just need the bin folder in the example and run the install_dependencies script in the computer where you want to run the application.

Hey arturo! Thanks for the reply. :slight_smile:

So, On the other system with fresh ubuntnu installation, I’ve installed all the dependencies with install_dependencies script. Further, I copied compiled version of Openframeworks folder(Which contains .a files compiled) but executables don’t work anymore.

Out for the weekend, Would be able to get my hands on it tomorrow. I can get back with error messages soon(If any).

you shouldn’t need to copy the .a since those are linked into the final binary. you will need for both machine to have the same version of the OS or otherwise some libraries the app will depend on won’t be compatible

On the target machine, you can use ldd /path/to/your/executable/app to list which library are needed and which of them are missing (when showing Not found).

Well, amazingly it just worked!! :slight_smile:

I tried this by creating two virtual machines running same version of ubuntu. Where, I compiled OF on a compile machine, and then compiled one of the examples. Deployed the compiled example(a binary) on the target machine without having to compile again! It just worked!!! :slight_smile:

I’d be now adding more OF-addons and few external cpp libraries to the app I’m working on and will try deploying it on the target machine soon.
Secondly, I guess just copying the binary would even work on a different machine with a different configuration running same ubuntu version.

Will post the results on the same this week! Thanks a lot arturo and groolot :heart_eyes: