Removing gcc 4.1.2 from PATH so it picked up 4.9.4 which resolved this
issue.
Still would be good to know if it is possible to know which gcc go is
using...
On Thursday, May 20, 2021 at 9:46:34 AM UTC-4 Aaron Epstein wrote:
> gcc
>
> Is there a way to see which version go is pick
gcc
Is there a way to see which version go is picking up? I have both 4.9.4 and
4.1.2. I suspect it is picking up 4.1.2 and this is the cause, but is there
a way to tell?
On Thursday, May 20, 2021 at 9:36:57 AM UTC-4 Ian Lance Taylor wrote:
> On Thu, May 20, 2021, 4:47 AM Aaron Epstein wr
Hi,
I am seeing a compiler error when building a shared c library from a go
program. The error is:
GO111MODULE=on go build -buildmode=c-shared -o mylib.so myfile.go
# runtime/cgo
cc1: warnings being treated as errors
_cgo_export.c:6: warning: ignoring #pragma GCC diagnostic
_cgo_export.c:7: warn
Lance Taylor wrote:
> On Wed, Apr 28, 2021 at 8:41 AM Aaron Epstein wrote:
> >
> > I have a C library that I am linking with from Go whose name is known at
> build-time, and is not a constant I can write in a comment like
> > // #cgo LDFLAGS: -lmylib
> >
> > The
Hi,
I have a C library that I am linking with from Go whose name is known at
build-time, and is not a constant I can write in a comment like
// #cgo LDFLAGS: -lmylib
The library name is parameterized, i.e. libmy{VAR_NAME}lib.so
Cgo doesn't seem to be able to handle environment variables, so I