问题
To outline my end goal. I want to compile a go application, statically linking to QT5. I have statically compiled QT5. Now I need to compile my Go program.
As I understand it to do this, I have to use gccgo rather than the gc compiler. Fine.
So first I have to install the gccgo compiler, which is gcc with the go
language enabled in config.
I have followed this: https://golang.org/doc/install/gccgo
and this seperately: https://solarianprogrammer.com/2016/05/10/compiling-gcc-6-mac-os-x/
to see if I could use a newer version of GCC. However in both cases I receive:
checking for isl 0.16, 0.15, or deprecated 0.14... yes
checking for isl 0.16 or 0.15... yes
configure: error:
The following requested languages could not be built: go
Supported languages are: c,c,c++,fortran,jit,lto,objc,obj-c++
when I run configure
before make
and make install
So apparently GCC doesn't know about Go even though the Go documentation says this is how to do it?
Anyone got any reliable source for doing this?
来源:https://stackoverflow.com/questions/41765665/osx-golang-static-compile-and-installing-gccgo