FeatureRequestNeedsInvestigationcompiler/runtimehelp wanted
仓库指标
- Star
- (133,883 star)
- PR 合并指标
- (30 天内没有已合并 PR)
描述
What version of Go are you using (go version)?
Does this issue reproduce with the latest release?
Yes
What did you see?
The cgo generated file _cgo_export.c includes stdlib.h before anything else (see here). It precludes the possibility to use some "include first" headers without errors or warnings, such as Python.
From the Python docs:
Since Python may define some pre-processor definitions which affect the standard headers on some systems, you must include Python.h before any standard headers are included.
Cgo should allow to inject a C preamble before any other include directive.