[Solved] Now that part of the .NET Framework runs on Mac and Linux, how can we know if a .NET app will run outside of Windows?

If your app runs fine on .NET Core 5 in Windows (not full .NET Framework), then by definition it should run on .NET Core 5 on OS X and Linux. However that’s still too optimistic, as file paths and so on are still different enough to impact the way you write your code. Thorough testing … Read more

[Solved] C printf cross-platform format without warnings [duplicate]

For size_t, assuming you have a sufficiently modern C library, use %zu. If you can’t use the z modifier (some older libraries unfortunately don’t support it), cast to a wide-enough known type when printing, and then use a width specifier appropriate to that type: size_t sz = sizeof(whatever); … printf(“%lu”, (unsigned long)sz); This works as … Read more