#!/bin/bash
export GOROOT=/home/your-name/hg
export GOOS=linux
export GOARCH=386
8g main.go
8l main.8
./8.out
read -p "Press [enter] to continue..."
If script doesn't work - cher path to the bash (for me it's /bin/bash), path to /hg and architecture. Also if you have 64-bit x86 system - you should write instead 8 write 6. If 32-bit x86, and more - 8.
And don't forget put execution rights ot this file.
I have these variables:
ReplyDeleteexport GOROOT=$HOME/Go
export GOARCH=386
export GOOS=darwin
export GOBIN=$HOME/Go/binz
Even though I get this error:
desertfather:binz Cato$ 8g main.go
main.go:7: fatal error: can't find import: ./irc
And an ls in the binz folder shows the IRC folder =/
did you write "irc" import?
ReplyDeleteBecause I can't see any "irc" in documentation. If yes - write right path to this.
http://github.com/jteeuwen/go-app-irc/ <= The irc import is in this package.
ReplyDeletedesertfather:src Cato$ ls
irc main.go text
desertfather:src Cato$ 8g main.go
main.go:7: fatal error: can't find import: ./irc
Nevermind! I figured it out. Noobish really :P I had to compile the libraries as well :)
ReplyDeleteI have the same issue for the oh shell. I have been trying to make a PKGBUILD for it.
ReplyDeletehere is go-tecla:
https://aur.archlinux.org/packages.php?ID=50005
here is oh:
https://aur.archlinux.org/packages.php?ID=50007
I would be very happy if someone sees what I have been doing wrong. The official instructions only show how to do it with goinstall but that is not very packaging-friendly