4 ms·
Use MinUnit.h https://jera.com/techinfo/jtns/jtn002 https://jera.com/techinfo/jtns/jtn002 Consider using Clang-Tidy with `-*,cert-*` (Which disables all d
by LabMechanic 3y ago
Use MinUnit.h
https://jera.com/techinfo/jtns/jtn002 https://jera.com/techinfo/jtns/jtn002
Consider using Clang-Tidy with
`-*,cert-*`
(Which disables all default options, and checks your code according to the Secure coding standard (CERT) ruleset.)
Use Clang-Format as well.
If you use Clang, consider `-Weverything -fsanitize=address,undefined` and disable options that you do not need.
Consider using NMake or Make (or just write a simple script to automate building the stuff).
Here's a Google-esque style guide for C:
https://gist.github.com/davidzchen/9187878 https://gist.github.com/davidzchen/9187878
At least, this is my approach.
- LabMechanic 3y agoHere's a simple NMAKE Makefile using MSVC to compile a Win32 application on Windows 11: CC = cl.exe LD = link.exe CFLAGS = /Od /Zi /FAsu /std:c17 /permissive- /W4 /WX LDFLAGS = /DEBUG /MACHINE:X64 /ENTRY:wWinMainCRTStartup /SUBSYSTEM:WINDOWS LDLIBS = user32.lib gdi32.lib PREFIX = ../src/ all: app.exe app.exe: app.obj $(LD) $(LDFLAGS) /OUT:app.exe app.obj $(LDLIBS) app.obj: $(PREFIX)app.c $(CC) /c $(CFLAGS) $(PREFIX)app.c clean: rmdir /q /s build