Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
h0ru5854yI also have faced your struggle, and your description is very accurate indeed. Maintining several libs and executables across various platforms, we came up with dockerizing our cross-compilers with the goal of creating the same environment for each build, and only if-needed doing target specific steps in the CMakelists.txt based on an env-var that got set by the container
called by a shellscript shadowing the magic of mounting source dir and ssh keys and whatnot into the container, it works with spartanic comfort.
I really wish therer was a better tooling for C/C++ also for complex x-compile cases. I heard some people had set up nice chains using Conan, but did not try it out yet. -
@h0ru5 any tips on cross compiling for windows in a linux container? How do you get the SDK libs and headers and whatnot? How do you get link.exe? WINE? Or do you run on e.g. appveyor or another windows-based CI?
-
h0ru5854ythe targets above are various linux-es and architectures, luckily no windows.
It could be that Mingw64 is an option for you, there are dockerized crosscompilers for it, e.g. dockcross.
I used appveyor with js once and it was good enough, the tricky part more that you have to write/maintain quite different CI/CD lanes for both linux and win.
Related Rants
Writing cross compilation build scripts make me feel like I'm constructing a log cabin from scratch, on the moon, without a suit, and no trees.
CMake toolchains are a joke. I've thrown them out entirely at this point and am writing custom detection logic for the different cross compilation combinations.
On that note, Microsoft's layout for their development kit is an absolute NIGHTMARE. Get your shit together, Microsoft.
Going to be a VERY long day.
rant
microsoft
cross compilation
cmake