$ go build -n
## _/home/action/workspace/go/src/hello#
mkdir -p $WORK/_/home/action/workspace/go/src/hello/_obj/cd /home/action/workspace/go/src/hello/home/action/.go/pkg/tool/linux_amd64/6g -o $WORK/_/home/action/workspace/go/src/hello/_obj/_go_.6 -p _/home/action/workspace/go/src/hello -D _/home/action/workspace/go/src/hello -I $WORK ./hello.go/home/action/.go/pkg/tool/linux_amd64/pack grcP $WORK $WORK/_/home/action/workspace/go/src/hello.a $WORK/_/home/action/workspace/go/src/hello/_obj/_go_.6 ./hello.syso ./a.syso ./b.sysocd ./home/action/.go/pkg/tool/linux_amd64/6l -o hello -L $WORK $WORK/_/home/action/workspace/go/src/hello.a# 图标源文件
hello.ico
# 创建rc文件echo 'IDI_ICON1 ICON "hello.ico"' > hello.rc
# 生成资源目标文件windres -o hello.syso hello.rc
# 编译Go源码, 输出目标文件# go build -ldflags '-s -w'go tool 8g -o hello.8 hello.gogo tool pack grcP . hello.a hello.8 hello.sysogo tool 8l -o hello.exe -L . hello.a好奇的问一句,在哪里使用这些资源文件
--
--
官网: http://golang-china.org/
IRC: irc.freenode.net #golang-china
@golangchina
---
您收到此邮件是因为您订阅了 Google 网上论坛的“Golang-China”论坛。
要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到 golang-china...@googlegroups.com。
要在网络上查看此讨论,请访问 https://groups.google.com/d/msgid/golang-china/66372762-55a5-4aeb-8515-1e547410f636%40googlegroups.com。
要查看更多选项,请访问 https://groups.google.com/groups/opt_out。
On Nov 7, 2013 10:12 AM, "灬猜想灬" <joe...@gmail.com> wrote:
>
> 可能经常会在一个目录下面放置多个图标资源文件.
>
> 编译的时候就会报错.
报什么错?
我的问题是存在多个图标资源的情况,没参数指定只使用其中一个, gc会自动加载所有的资源文件,所以报错了。
目前的办法就是在makefile里面将编译的几行代码手工编写进去,自己指定需要的图标资源。
我的问题是存在多个图标资源的情况,没参数指定只使用其中一个, gc会自动加载所有的资源文件,所以报错了。
目前的办法就是在makefile里面将编译的几行代码手工编写进去,自己指定需要的图标资源。
--
--
官网: http://golang-china.org/
IRC: irc.freenode.net #golang-china
@golangchina
---
您收到此邮件是因为您订阅了 Google 网上论坛的“Golang-China”论坛。
要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到 golang-china...@googlegroups.com。