On Jun 22, 2026, at 18:18, Kenneth Wolcott wrote:

>  This Go+GMP+GO_GMP_wrapper has worked fine for me in the past with
> other Rosetta Code tasks written in Go. The build process as
> illustrated by "go help" and "go [cmd] help" do not expand to anything
> regarding compile and/or linkage flags.  Perhaps I should look deeper
> than just "go help" and friends :-)

Does this help?

https://stackoverflow.com/questions/70412041/how-to-specify-the-cflags-parameter-in-go-build-command-line-instead-of-in-the-g

It says:

> When building, the CGO_CFLAGS, CGO_CPPFLAGS, CGO_CXXFLAGS, CGO_FFLAGS and 
> CGO_LDFLAGS environment variables are added to the flags derived from these 
> directives.


Based on this, I would try:

CGO_LDFLAGS=-L/opt/local/lib /opt/local/bin/go build ./file.go


Reply via email to