GOLand 搭建Go语言开发环境
2018-01-20 21:10
609 查看
Go环境: 1.9.2 IDE: GoLand第一步 : GO环境安装Go环境下载地址:https://www.golangtc.com/download下载好之后,在命令行窗口执行: go env (查看当前的GO开发环境)Go 环境安装成功。第二步:安装 IDEIDE 下载地址:http://www.jetbrains.com/go/?fromMenuIDE安装就是平常的傻瓜式安装,这里就不多说了。第三步:搭建环境GO环境和IDE安装好之后,两者怎么联系起来呢?????看图:GOROOT就是IDE的开发环境,打开IDE的配置之后,就自动填充进来了。除此之外,还需要配置一下你的开发目录,GOPATH,也就是你程序放的目录。注意:这个是在环境变量里面配置的。接下来,你就可以用GOLAND创建工程了,但是在运行的时候,部分人会报这样的错。
# runtime C:\Go\src\runtime\mstkbar.go:151:10: debug.gcstackbarrieroff undefined (type struct { allocfreetrace int32; cgocheck int32; efence int32; gccheckmark int32; gcpacertrace int32; gcshrinkstackoff int32; gcrescanstacks int32; gcstoptheworld int32; gctrace int32; invalidptr int32; sbrk int32; scavenge int32; scheddetail int32; schedtrace int32 } has no field or method gcstackbarrieroff) C:\Go\src\runtime\mstkbar.go:162:24: division by zero C:\Go\src\runtime\mstkbar.go:162:43: invalid expression unsafe.Sizeof(composite literal) C:\Go\src\runtime\mstkbar.go:162:44: undefined: stkbar C:\Go\src\runtime\mstkbar.go:212:4: gp.stkbar undefined (type *g has no field or method stkbar) C:\Go\src\runtime\mstkbar.go:213:15: gp.stkbar undefined (type *g has no field or method stkbar) C:\Go\src\runtime\mstkbar.go:216:23: undefined: stackBarrierPC C:\Go\src\runtime\mstkbar.go:226:28: gp.stkbarPos undefined (type *g has no field or method stkbarPos) C:\Go\src\runtime\mstkbar.go:227:19: gp.stkbarPos undefined (type *g has no field or method stkbarPos) C:\Go\src\runtime\mstkbar.go:248:41: undefined: stkbar C:\Go\src\runtime\mstkbar.go:227:19: too many errors
错误原因:
安装的GO环境的时候,将GO安装在非C盘,将GO环境安装在 C 盘之后就不会报这个错误了
相关文章推荐
- Go语言知识积累:windows开发环境搭建
- 最全Windows下搭建go语言开发环境以及开发IDE
- Windows下搭建go语言开发环境 以及 开发IDE (附下载链接)
- windows 下快速搭建go 语言开发环境
- windows下用eclipse+goclipse插件+gdb搭建go语言开发调试环境
- windows下用eclipse+goclipse插件+gdb搭建go语言开发调试环境
- mac下用eclipse搭建go语言开发环境
- 在centos6.3_64bit 上的GO语言开发环境搭建
- OS X 10.11搭建go语言1.5.1开发环境
- windows下用eclipse+goclipse插件+gdb搭建go语言开发调试环境
- Go语言开发环境搭建for Windows
- Win7下搭建Go语言开发环境
- Mac OS X系统搭建谷歌Go语言开发工具 Sublime Text 2环境配置
- Go语言-Windows开发环境搭建
- windows下用eclipse+goclipse插件+gdb搭建go语言开发调试环境
- windows下用eclipse+goclipse插件+gdb搭建go语言开发调试环境
- 在Mac中搭建go语言开发环境的操作步骤
- Go语言知识积累——特点简介与windows开发环境搭建
- Go语言开发环境搭建与配置
- linux上搭建完整go语言vim开发环境