// from Go so that they are callable from C.
func (p *Package) writeExports(fgo2, fc, fm *os.File) {
fgcc := creat(*objDir + "_cgo_export.c")
- fgcch := creat("_cgo_export.h")
+ fgcch := creat(*objDir + "_cgo_export.h")
fmt.Fprintf(fgcch, "/* Created by cgo - DO NOT EDIT. */\n")
fmt.Fprintf(fgcch, "%s\n", gccExportHeaderProlog)
Output: output,
})
outGo = append(outGo, gofiles...)
- exportH := filepath.Join(b.path, "_cgo_export.h")
- b.script.addIntermediate(defunC, exportH, b.obj+"_cgo_flags")
+ b.script.addIntermediate(defunC, b.obj+"_cgo_export.h", b.obj+"_cgo_flags")
b.script.addIntermediate(cfiles...)
// cc _cgo_defun.c