Compile code ported from Linux to windows and MingW-w64
Compile code ported from Linux to windows and MingW-w64
Can anyone tell me how can I compile code using POSIX headers in windows system?
OS: Windows 10
installed:
MingW-w64
MingW
Code:Blocks Version 17.12
MSVS 2017 free version
No Cgywin
The code was developed in Linux system and uses a lot of POSIX stuff.
such as
#include <sys/types.h>
#include <sys/fcntl.h>
#include <sys/mman.h>
#include <sys/time.h>
#include <sys/ipc.h>
#include <sys/shm.h>
I want to compile it under windows system. Is there any win32 version of those POSIX lib/header that ported to windows?
Someone told me MinGW-w64 could but I cannot find any of those headers.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
If you can't use Cygwin, or any other POSIX emulating environment you might want to consider doing a proper port, using the Windows API. Note that MinGW is just a port of the GCC compilers, not of the POSIX environment. You could maybe use MSYS for some parts, but considering the headers you include then probably not.
– Some programmer dude
Jun 29 at 22:10