Я пытаюсь импортировать и использовать пакет C, но постоянно получаю эту ошибку:
# runtime/cgo
cc1.exe: error: too many filenames given. Type cc1.exe --help for usage
cc1.exe: fatal error: Files/Win-builds/include: No such file or directory
compilation terminated.
exit status 2
Process exiting with code: 1
это код:
package main
import (
"C"
"fmt"
"unsafe"
)
func main() {
c := 1
var Cvar C.int = 1
cup := unsafe.Pointer(&c)
cbyte := C.GoBytes(cup, Cvar)
fmt.Printf("%x", cbyte)
}
Я искал везде на inte rnet но не смог найти решения.
Вкл. windows 64 бит:
> gcc --version
gcc (GCC) 4.8.3
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> go version
go version go1.14 windows/amd64
Есть ли способ решить проблему?