我正在尝试编译一个hello-world应用程序:
8g test1.go -o test1.8错误:
open -o: No such file or directory具有讽刺意味的是,当我不使用-o时,它工作得很好:
8g test1.go如何指定go命令行编译器8g的对象文件名
(8g版本release.r60 9481)
发布于 2012-03-30 22:48:42
当8g在不带参数的情况下运行时,它会输出如下内容:
gc: usage: 8g [flags] file.go...
flags:
...
-m print optimization decisions
-o file specify output file
-p assumed import path for this code
...请注意,[flags]位于file.go之前。在传递参数时,需要遵守这种顺序。这与接受任意顺序的选项和文件的gcc不同。
发布于 2012-03-30 22:26:54
基于文档
http://golangtutorials.blogspot.com/2011/05/checking-we-have-go-setup-right.html和
Multiline command.go in SciTE和
http://sourcetree.wordpress.com/tag/go/
你可以试试
>8g test1.go
>8l -o test1.8
>./8.out发布于 2012-03-30 22:48:20
https://stackoverflow.com/questions/9944652
复制相似问题