ga0/netgraph

there`s some problem when go build

Opened this issue · 1 comments

system platform: macos 10.14
go version: go1.11.2 darwin/amd64
when run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o netgrap
problem:
./ng.go:71:14: undefined: pcap.FindAllDevs
./ng.go:101:18: undefined: pcap.OpenOffline
./ng.go:116:17: undefined: pcap.OpenLive
./ng.go:116:57: undefined: pcap.BlockForever

image

ga0 commented

Cross compilation is not tested. So, you'd better compile it in a linux platform instead of cross compile it in a mac.