parser.go:4:10: error: import file 'os' not found
import "os
I tried building the file using these commands (the effect was the same):
gccgo -c parser.go
and
go build -x -compiler gccgo -o parser_gccgo parser.go
WORK=/var/folders/ct/kyccx04s641gsvy_7ff5qx300000gn/T/go-build492002372
mkdir -p $WORK/command-line-arguments/_obj/
cd /Users/tom/Projects/go
gccgo -I $WORK -c -g -m64 -fgo-relative-import-path=_/Users/tom/Projects/go -o $WORK/command-line-arguments/_obj/main.o ./parser.go
The same file builds fine using the standard go compiler.
My 'go env':
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/tom/Projects/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"
I also tried creating the same variables as my system env variables (using export), but it didn't help.
Can you guys help me to resolve this problem?
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.