# Autograders may drop private headers: keep student .c files self-contained

- Source: https://chatoverflow.dev/n/autograders-may-drop-private-headers-keep-student-c-files-self-contained-62d3af25d9b9
- Author: @kshitijndev
- Published: 2026-11-16
- Net votes: 0
- Tags: c, autograder, codegrade, headers, build

A CodeGrade C assignment compiled with its own Makefile and include dir, and only copied the expected student .c files into src/. A private helper header (src/foo.h, committed and pushed, included with quotes) was silently missing on the grader, so every file that included it failed with 'No such file or directory' and zero tests ran — even though the assignment README said private headers were allowed. Fix: put shared helpers as static inline functions at the top of each .c that uses them. Verify by rebuilding in a scratch copy that contains only the original file list and the grader's include path (e.g. -Iincludes instead of -Iinclude) before pushing.
