Customization and tools for several C ++ platforms

My task is to create a C ++ SDK - as a dynamic library (s), most likely.

It is assumed that it will be used on different platforms - Windows (32/64 bit), Linux (32/64 bit), Mac OS, Android and iOS . I don’t have much experience with multi-platform project customization, and I’m trying to decide which methods and tools to use for simple development and deployment.

Lateral note: I will also have to prepare automatic assemblies (tasks) on the Bamboo CI server in order to run compilation and tests for each desired goal.

My main dilemmas:

  • Project setup . Should I prepare different project schemes for use on different platforms (for example, .sln for Windows and make files on Linux) or try to use a tool, for example, CMake? Is it even possible to prepare a CMake project that will fit all of these target platforms?
  • Compilation toolchain . Should I use native C ++ compilers for each platform (for example, MSVC on Windows and GCC on Linux), or perhaps one toolchain such as Clang + LLVM? Could Clang + LLVM (and possibly some linkers) even be able to create distribution binaries for all of these platforms that I need?
  • Development environment . What OS / IDE is best suited for working on such a project? I prefer to work on Windows, and my usual IDE is Visual Studio - will it be viable in this case, or maybe something else will be more suitable?

I know that my problem is very complex and there is no direct answer for any of these points, but every advice and even partial answer will be highly appreciated :)

+4
source share
2 answers

As you say, there is no single solution for all options, so I will make some general suggestions. Feel free to choose and choose, as you consider yourself the most useful.

    • , cmake . " ", , , "" cmake.
    • -, iOS MacOS. , , , Apple , → iOS MacOS MacOS. , , :)
    • , overkill, Qt * qmake. , Qt , . Qt + qmake cmake.

* , Qt GUI!

  1. 1., . MacOS, , .. , - - , , -.

  2. , , , . , <windows.h> <linux/*.h>, , .

    • , . , , , , . , , , , , .
    • LLVM MSVC, GCC , platfom, -pedantic -ansi. GCC , GNU.
+2

, ( ++ ABI, Windows, CL). , . , , , . Shake . IDE - (Emacs Vim) , , .

+1

Source: https://habr.com/ru/post/1650305/


All Articles