![]() I do single codebase development where the same C/C++ code will build on Linux, Windows, MacOS, BSD and Solaris. ![]() Not to deliver a Windows build on an embedded system, rather for testing and QA of the same embedded system codebase in Windows with access to the superb Microsoft Visual Studio debugger and its excellent static code checker that detects memory overruns.Īlthough libunistd was predominately written by me, appreciate any good bug fixes, patches or pull requests. Libunistd is being used for safety-critical Linux embedded systems. Libunistd later moved from SourceForge to github and has been continuously improved, with more and more BSD and System V calls added. CinePaint is an open source HDR paint application used in making motion pictures, including the Harry Potter and Lord of the Rings films. Libunistd was originally created to port Linux CinePaint to Windows in 2002. Similar for Qdecoder, Sqlite and xxHash, however you should check their license terms yourself as libunistd is not the owner of these other open source libraries. In other words, you may do pretty much whatever you want with libunistd. Uuid: A small unique identifier library created elsewhere. XxHash: A small hash library created elsewhere. Sqlite: A small SQL library created elsewhere. Qdecoder: A small HTTP library created elsewhere. Portable: System classes, such as StdFile that encapsulates the standard FILE* C API into a C++ class with constructors and destructors. Libunistd has some additional small libraries that are not POSIX, but can be useful to those of us developing cross-platform code. Look up in the Linux man page the "unknown" function and include all the header files that the Linux man page says it requires. ![]() If you port Linux code to FreeBSD or Mac OS X, you may have encountered this before, that the compiler sometimes objects to unknown POSIX functions. As a result, sometimes Linux code will compile that's not strictly legit, that it hasn't explicitly included all necessary header files. In Linux, some standard headers include other standard header files. When porting your Linux program to Windows for the first time, you may have to include more POSIX headers than were necessary in your Linux code. It implements many other header files that are POSIX standards, including pthreads.h. Simply write C++ code as you would for Linux, and it should build in Visual Studio for Windows. Avoid #ifdef _WIN32 ugliness in your code. Because unistd.h exists in Linux as a standard header file, making this change for Windows will not break Linux code. Doing this will include the magic to make basic Linux APIs work in Windows.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |