在不在os中设置gopath,goroot的情况下

建立build.sh文件,文件内容如下:

export GOARCH="386"
export GOBIN="/home/looler/下载/go/bin"
export GOEXE=""
export GOHOSTARCH="386"
export GOHOSTOS="linux"
export GOOS="linux"
export GOPATH="/home/looler/go:/home/looler/下载/goproject"
export GORACE=""
export GOROOT="/home/looler/下载/go"
export GOTOOLDIR="/home/looler/下载/go/pkg/tool/linux_386"
export GCCGO="gccgo"
export GO386=""
export CC="gcc"
export GOGCCFLAGS="-fPIC -m32 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build128906296=/tmp/go-build -gno-record-gcc-switches"
export CXX="g++"
export CGO_ENABLED="1"
export PKG_CONFIG="pkg-config"
export CGO_CFLAGS="-g -O2"
export CGO_CPPFLAGS=""
export CGO_CXXFLAGS="-g -O2"
export CGO_FFLAGS="-g -O2"
export CGO_LDFLAGS="-g -O2"

$GOBIN/go build -buildmode=plugin hello.go

ubuntu下建立golang的build脚本的更多相关文章

  1. ubuntu下使用golang、qml与ubuntu sdk开发桌面应用

    ubuntu下使用golang.qml与ubuntu sdk开发桌面应用 (简单示例) 找了很长时间go的gui库,试了gtk,准备试qt的时候发现了这个qml库,试了下很好用. 准备工作 1.Go ...

  2. 【转】在Ubuntu下建立Eclipse的Android开发环境

    本文将介绍如何建立Ubuntu下基于Eclipse的Android开发环境的方法. 大部分的Android开发者都是使用Eclipse来开发Android,本文将向各位介绍一下建立Ubuntu下基于E ...

  3. 在ubuntu下配置apache运行python脚本

    2008-12-05    常用的简单命令 sudo apt-get remove --purge apache apache2 (彻底删除)   sudo /etc/init.d/apache2 r ...

  4. Ubuntu下安装Golang并测试HelloWorld

    Intel Core i5-8250U,Ubuntu 18.04(安装在虚拟机Oracle VirtualBox 5.2.12上),Go 1.11, 安装步骤如下: -进入Go文档官网: https: ...

  5. ubuntu下使用golang、qml与ubuntu sdk开发桌面应用 (简单示例)

    找了很长时间go的gui库,试了gtk,准备试qt的时候发现了这个qml库,试了下很好用. ##准备工作 **1.Go 1.2RC1** go的版本应该不能低于这个,我是在1.2RC发布当天升级后发现 ...

  6. Ubuntu 下建立WiFi热点的方法

    使用ap-hotspot来创建WIFI热点.终端里输入: $ sudo add-apt-repository ppa:nilarimogard/webupd8 $ sudo apt-get updat ...

  7. ubuntu下安装golang

    1.安装 sudo apt-get install golang 2.查看go的安装路径 go env 查看 GOROOT="/usr/lib/go-1.6" 3.修改环境变量 e ...

  8. ubuntu下建立NFS共享,并用开发板挂载

    安装NFS服务 apt-get install nfs-kernel-server nfs-common apt-get install portmap 在/etc/exports里加入 /home/ ...

  9. ubuntu 下建立桌面快捷方式

    1)新建文件eclipse.desktop,命令如下: sudo vim /usr/share/applications/eclipse.desktop 2)在新建文件中添加如下内容并保存: [Des ...

随机推荐

  1. 贝勒爷教你怎样在Mac上安装Microsoft Office

    1.亲,鼠标双击该安装文件: 2.非常好,你将会看到这样一个东东(假设没有看到那就不要来见我了): 3.不错,再次双击红色区域,假设出现下面提示,别怕哈: 4.点击"好"butto ...

  2. [NPM] Use a shorthand syntax for running multiple npm scripts with npm-run-all

    Running multiple scripts in series or in parallel can become very verbose. Using a tool such as npm- ...

  3. XSS攻击之基础篇:HTML标签与字符串的渲染

    <body> XSS攻击之基础篇:HTML标签与字符串的渲染 测试 <div class="a1"> </div> <div class= ...

  4. 数据竞赛利器 —— xgboost 学习清单

    1. 入门大全 xgboost 作者给出的一份完备的使用 xgboost 进行数据分析的完整示例代码:A walk through python example for UCI Mushroom da ...

  5. matlab 图像的保存

    gcf:获取当前显示图像的句柄: 默认 plot 的 position 是 [232 246 560 420] 0. save >> A = randn(3, 4); >> B ...

  6. jscript的常用文件操作

    作者:朱金灿 来源:http://blog.csdn.net/clever101 1.重命名文件 var fso = new ActiveXObject("Scripting.FileSys ...

  7. Diffie-Hellman Key Exchange – A Non-Mathematician’s Explanation

    The Complete Diffie-Hellman Key Exchange Diagram The process begins when each side of the communicat ...

  8. 百度2014 Summer Party视频集锦

    博客已经迁移到reetsee.com,在百度或其他搜索引擎搜"吹水小镇"就能够了.要看原版的博客请到:blog.reetsee.com 转载请注明: 吹水小镇 | reetsee. ...

  9. 《modern operating system》 chapter 5 Input and output 注意事项

    Input / Output It should also provide an interface between the devices and the rest of the system th ...

  10. Scala Control Structures

    Scala之Control Structures 一.前言 前面学习了Scala的Numbers,接着学习Scala的Control Structures(控制结构). 二.Control Struc ...