News for hackers. Stuff that matters.
Re:Modern C, Second Edition by Santosh83 on Wednesday September 18, 2019 @01:46PM (#21007942)
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?
Re:Modern C, Second Edition by jeremyjh on Wednesday September 18, 2019 @02:45PM (#21008612)
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.
Re:Modern C, Second Edition by Gibbon1 on Thursday September 19, 2019 @02:30AM (#21013831)
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.

Re:Modern C, Second Edition by badsectoracula on Thursday September 19, 2019 @09:29AM (#21015943)
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.

Re:Modern C, Second Edition by chaotic_clanger on Thursday September 19, 2019 @03:52AM (#21014219)
cygwin

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

Re:Modern C, Second Edition by AlexeyBrin on Wednesday September 18, 2019 @02:01PM (#21008136)
Clang and GCC both support C17 and there are binary versions for Windows see MSYS2. I think Pelles C also supports C11.
Re:Modern C, Second Edition by basementcat on Wednesday September 18, 2019 @03:28PM (#21009052)
Does glibc support cthreads yet?
Re:Modern C, Second Edition by AlexeyBrin on Wednesday September 18, 2019 @03:59PM (#21009418)
AFAIK, C11 threads are supported only in Linux. From a glibc point of view C11 threads are supported since v2.28.
Re:Modern C, Second Edition by earenndil on Wednesday September 18, 2019 @05:03PM (#21010170)
C11 threads are also available on freebsd and possibly (don't know) other BSDs. Pelles c also supports them.
Re:Modern C, Second Edition by rwmj on Wednesday September 18, 2019 @01:49PM (#21007977)
GCC 8 and above support C17, and there is a version available for Windows. See also: https://gcc.gnu.org/onlinedocs/gcc/Standards.html
Re:Modern C, Second Edition by 80x25 on Wednesday September 18, 2019 @07:33PM (#21011646)