douba3975 2016-02-29 17:58
浏览 324

无法弄清楚如何使用Docker容器进行交叉编译

I am trying to cross compile some Go code to a windows target (based on this guide https://hub.docker.com/_/golang/):

$ docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp -e GOOS=windows -e GOARCH=386 golang:1.5 go get github.com/gorilla/websocket && go build -v
conn.go:8:2: cannot find package "github.com/gorilla/websocket" in any of:
/usr/lib/go/src/github.com/gorilla/websocket (from $GOROOT)
/home/mark/devel/gocode/src/github.com/gorilla/websocket (from $GOPATH)

I try to compile this: https://github.com/gorilla/websocket/tree/master/examples/chat) ...but I can not figure out the correct command line :(

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 素材场景中光线烘焙后灯光失效
    • ¥15 请教一下各位,为什么我这个没有实现模拟点击
    • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
    • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 保护模式-系统加载-段寄存器