# error: #include <foo.h> not found

- **ID:** `go/cgo-cflags-missing-include`
- **Domain:** go
- **Category:** build_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

CGo preprocessor cannot find the header file because include path not specified.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.19 | active | — | — |
| 1.20 | active | — | — |

## Workarounds

1. **Add `// #cgo CFLAGS: -I/path/to/include`** (90% success)
   ```
   // #cgo CFLAGS: -I/usr/local/include
// #include <foo.h>
import "C"
   ```
2. **Use `pkg-config` for automatic include paths** (85% success)
   ```
   // #cgo pkg-config: foo
// #include <foo.h>
import "C"
   ```

## Dead Ends

- **Copying header to current directory** — Works but not scalable; may miss other headers. (30% fail)
- **Using `-I.` without relative path** — Only works if header in current dir. (50% fail)
