Hacker News new | past | comments | ask | show | jobs | submit login

On a related note, do we have any fully complaint C11 compiler for MS Windows or is using gcc under WSL (or a VM) the best option? I take it there is no C17 compliant compiler yet?



You don’t need WSL to run gcc on windows. You can use the mingw distribution to get a GNU tool chain that compiles a standard windows EXE.


Stuff people 'just know'

mingw: For native build and execution. A lot of Windows IDE's will just work with mingw.

msys2: For posix compatible build but native win32 targets. Useful when your project uses autotools. Like when trying to build someones library. msys2 just tends to work. Trying to get autotools to work under windows tends to exceed my patience, time and brain cells.

cigwin: for a posix compatible build and runtime environment.

Also gcc can be built as a cross compiler. The two times I tried it is was more straight forward that I would have thought.


Note that msys2 isn't just for building programs, it provides a full bash environment with many unix tools and a package manager (pacman, same as in Arch Linux) to install more. The build environment is unixy enough to be able to build more tools from source using the classic ./configure; make; make install route (more or less, may need some modifications in the code).

For me my main use of msys2 is as a shell where i run scripts and command-line utilities with the build stuff being a distant secondary use.


cygwin

you can build also with gcc for cygwin, but you introduce a cygwin.dll (not sure about the name) dependency.


Clang and GCC both support C17 and there are binary versions for Windows see MSYS2. I think Pelles C also supports C11.


Does glibc support cthreads yet?


AFAIK, C11 threads are supported only in Linux. From a glibc point of view C11 threads are supported since v2.28.


C11 threads are also available on freebsd and possibly (don't know) other BSDs. Pelles c also supports them.


GCC 8 and above support C17, and there is a version available for Windows. See also: https://gcc.gnu.org/onlinedocs/gcc/Standards.html





Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: