for my Uplink.Net.wrapper I would like to build the uplinkc-lib for x86 (32bit). It is working for 64bit with this command:
go build -o storj_uplink.dll -buildmode c-shared
If I now switch the go-env like this:
set CC=i686-w64-mingw32-gcc
set CXX=i686-w64-mingw32-g++
set GOARCH=386
I can reproduce the problem, but I haven’t yet figured out what the cause is. It seems that there’s some interaction between modules, CGO and the custom arch. I need to debug the compiler to figure out what’s going on underneath.
This is interessting. It works if I set it - so Thank you very much!
The strange Thing is: if I start my command prompt and do a go env, I can see that this Parameter is set already. I had this one in view, but thaught “it’s set already, so it is ok”.
In case anyone is interested: I also had to set some linker-flags so that the function names in the created DLL are not decorated with the amount of parameters the function has (like with a trailing @8):
set CGO_CFLAGS=-g -O2 -Wl,–kill-at
set CGO_CXXFLAGS=-g -O2 -Wl,–kill-at
set CGO_FFLAGS=-g -O2 -Wl,–kill-at
set CGO_LDFLAGS=-g -O2 -Wl,–kill-at