Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

C sample project

A tiny, dependency-free C project (~10 files) used to exercise CodeGraphContext’s indexer.
It mirrors the other language samples by showcasing common C patterns: headers/includes, typedefs, enums, structs, extern vs static variables, inline functions, function pointer typedefs, macros/conditional compilation, and a Makefile.

Layout

tests/sample_project_c/

├─ README.md

├─ Makefile

├─ include/

│ ├─ config.h

│ ├─ platform.h

│ ├─ util.h

│ ├─ module.h

│ └─ math/vec.h

└─ src/

├─ main.c

├─ util.c

├─ module.c

└─ math/vec.c

Quick run

From this folder:

make
./cgc_sample

Expected Output

On macOS/Linux (POSIX):

CgcSample 0.1.0 (posix) r=XX sum=(5,7,9)

On Windows:

CgcSample 0.1.0 (win) r=XX sum=(5,7,9)