Hi all,
If we use “go tool compile -S ” to compile a cgo file hello.go, the error “could not import "C": file not found” will be reported.
The cgo file hello.go
“
import "C"
import “fmt”
func main() {
fmt.println("hello")
}
”
This behavior of compiler seems unreasonable to me. Because sometimes we want to see the assembly code of some cgo files.
I think Go compiler should print the assembly code for Go codes and ignore C codes.
Can we change its behavior?
Thanks,
Fannie
--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-dev/AM7PR08MB5415A67E6B62295E00A6F306947C9%40AM7PR08MB5415.eurprd08.prod.outlook.com.
Try:go build -gcflags=-S hello.go