sr3
sr3

Reputation: 399

How to ship an app that uses a C++ library via CLI?

I’ve got an app that creates a child process to execute via CLI a compiled C++ library file. What is the best/most portable way of shipping my app with this library? I just need to ensure the compiled C++ code is available on the user’s system and that the executable is compatible with their system.

Upvotes: 1

Views: 170

Answers (1)

Cosmin
Cosmin

Reputation: 21416

C++ is compiled for each platform (Windows, macOs, Linux). So you need three different distributions:

  1. Windows - lowest common version (for example Windows 7). You also need to require or include the C++ redistributable for the compiled library.
  2. Linux - most use gcc, so again the lowest common version. No redistributable required.
  3. macOs is similar to Linux.

Each platform supports multiple compilers and IDEs. It’s down to personal choice.

Upvotes: 2

Related Questions