Linux port
The company I work for decided to port part of our application to Linux. At a first shot we will use WSL and Visual Studio but issues are not over.
- CMake is the lingua franca of generating cross platform build scripts. CMake is a beast of itself however
- WSL keeps sometimes its old configuration and source files. The best way is too clean all files and directories on the WSL host and then start fresh again.
- Msvc uses __declspec(dllexport) to export functions from DLL's; gcc doesn't have that.
- Msvc is pushing security enhanced versions of the CRT through its code analyzer. According to cppreference these functions are standardized albeit as extension (i.e. Annex K of C11). Unfortunately glibc has not implemented them; partially because some dubious reasoning. The API isn't perfect and there are pre-exisiting bounds checking crt still it's standardized and some people use them. So one ends up writing Windows and Linux specific code even in a layer which supposed to be platform independent.
- Warning suppression's in pre-compiled header in GCC are ignored in code. This not pretty; especially since some suppression's one want to apply to all sources and are therefore are primary candidate to put in pre-compiled header.
It seems that gcc might still contain some basic bugs. The warning about #pragma once in main file (when building a pre-compiled header) is only solved in version 14.
No comments:
Post a Comment