Building

Unity Build

  • Include all files you use in the main.c  file.

  • No uses of .h  files.

  • Just compile with clang main.c  and that's it.

  • Example:

    • .

Compiler Flags

C

  • clang -std=c23 -Wall -Werror file.c

    • Enable all warning.

    • Treat warning as errors.

C++

  • clang++ -std=c++23 -Wall -Werror file.cpp

  • clang -std=c++23 -Wall -Werror file.cpp

    • If the file extension is .cpp, Clang switches to C++ mode automatically.