Demo Code for presentation "Contemporary C In Action"
This code does not compile without the missing pieces (the precompiled modules mentioned in the code) because it is for educational purposes only. Besides that it is complete.
The missing pieces are:
- Asio, preferably non-Boost Asio
- libav FFmpeg
- SDL2 SDL
- argparse argparse
- modularized standard library
I have forked
plus
- a modularized standard library with a polyfill for the missing, not yet implemented parts: std.module
which contain the necessary changes to compile Asio, SDL, libav, and argparse as modules. My take on the C standard library module adds Casey Carter's current implementation of <generator>
, plus my implementation of <print>
and a partial implementation of C 26's explicit lifetime management P2590 on top of the standard library that comes with the compiler toolset of your choice.
There is also a minimum set of sources from FFmpeg v6.0 to compile module libav
. You need to provide the necessary link libraries yourself if you want to build the executable.
The videos of the keynote presentations are here:
Update 4 or better is highly recommended.
- open a VS2022 command line window
- cmake -B bld-msvc -G Ninja -Wno-dev -DCMAKE_CXX_STANDARD=23 --fresh
- ninja -C bld-msvc
Clang 16.0.2 or better is required.
- open a MSYS2 window
- export CC=clang
- export CXX=clang
- cmake -B bld-clang -G Ninja -Wno-dev -DCMAKE_CXX_STANDARD=23 -DCMAKE_CXX_FLAGS="-stdlib=libc " --fresh
- ninja -C bld-clang
Clang 16.0.2 or better is required. Clang 17 is recommended.
- open a terminal window
- export CC=clang-1x
- export CXX=clang -1x
- cmake -B bld -G Ninja -Wno-dev -DCMAKE_CXX_STANDARD=23 -DCMAKE_CXX_FLAGS="-stdlib=libc " --fresh
- ninja -C bld
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.