HaceraI
(Haceral)
1
I am trying to call a C shared library from Go, but i always get an error
command-line-arguments
cgo: exec C:\Program: exec: “C:\Program”: file does not exist
Today, I upgraded my go from 1.14 to 1.15. This prompt will appear when I run any project related to calling C after upgrading.
I can work normally when I use 1.14.
package main
import "C"
import "fmt"
func main() {
fmt.Println(C.add(1, 3))
}
I’ve installed it Mingw-w64
NobbZ
(Norbert Melzer)
2
If you build and run through your terminal rather than some IDE buttons?
HaceraI
(Haceral)
3
I tried to use the terminal to run, in the terminal it is normal
HaceraI
(Haceral)
4
Finally, I put mingw-w64
in a directory without spaces, so that the IDE and the terminal can run normally
Thank you for your help
1 Like
system
(system)
Closed
5
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.