{
  "id": "go/cgo-cflags-missing-include",
  "signature": "error: #include <foo.h> not found",
  "signature_zh": "错误：未找到 #include <foo.h>",
  "regex": "error:\\ \\#include\\ <foo\\.h>\\ not\\ found",
  "domain": "go",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "CGo preprocessor cannot find the header file because include path not specified.",
  "root_cause_type": "generic",
  "root_cause_zh": "CGo预处理器找不到头文件，因为未指定包含路径。",
  "versions": [
    {
      "version": "1.19",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.20",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Copying header to current directory",
      "why_fails": "Works but not scalable; may miss other headers.",
      "fail_rate": 0.3,
      "condition": "",
      "sources": []
    },
    {
      "action": "Using `-I.` without relative path",
      "why_fails": "Only works if header in current dir.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Add `// #cgo CFLAGS: -I/path/to/include`",
      "success_rate": 0.9,
      "how": "// #cgo CFLAGS: -I/usr/local/include\n// #include <foo.h>\nimport \"C\"",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use `pkg-config` for automatic include paths",
      "success_rate": 0.85,
      "how": "// #cgo pkg-config: foo\n// #include <foo.h>\nimport \"C\"",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-04-20",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}