$ENV:GOARCH = "amd64"
$ENV:CGO_ENABLED = 1
# # $ENV:CC = "C:`\Program Files (x86)`\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe"
go1.16.4 build -o RangerMetrics_x64.dll -buildmode=c-shared .

# THIS ONE WORKS
$ENV:GOARCH = "amd64"
$ENV:CGO_ENABLED = 1
go1.16.4 build -o RangerMetrics_x64.dll -buildmode=c-shared .


. "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\dumpbin.exe" /exports .\RangerMetrics_x64.dll


go build -buildmode=c-archive basictest.go
gcc -shared -W -c -c -c -o basictest_x64.dll RVExtension.c bases -Wl, --subsystem -Wl, windows -Wl, --inable-ctdcall-fixuptes -Wl, --subsystem -Wl, windows -Wl, --enable-stdcall-fixupt.a -Wl, --subsystem -Wl, windows -Wl, --enable-stdcall-fixup

g++ -o test -l mingw32 RVExtension.c .\RangerMetrics_x64.dll


go build -buildmode=c-archive arma.go
gcc -shared -pthread -o RangerMetrics_x64.dll RVExtension.c arma.a -lWinMM -lntdll -lWS2_32





$ENV:GOARCH = 386
$ENV:CGO_ENABLED = 1
go build -buildmode=c-archive basictest.go
gcc -shared -pthread -o basictest_x64.dll -fPIC RVExtension.c basictest.a

$ENV:GOARCH = "amd64"
$ENV:CGO_ENABLED = 1
go build -buildmode=c-archive basictest.go
. "C:\TDM-GCC-64-9.2.0\bin\gcc.exe" -shared -pthread -o basictest_x64.dll RVExtension.c basictest.a

$ENV:GOARCH = 386
$ENV:CGO_ENABLED = 1
go build -o basictest.dll -buildmode=c-shared .
. "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\dumpbin.exe" /exports .\basictest.dll

$ENV:GOARCH = "amd64"
$ENV:CGO_ENABLED = 1
$ENV:GOOS = "windows"
$ENV:CC = "x86_64-w64-mingw32-gcc"
go build -o basictest_x64.dll -buildmode=c-shared .
. "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\dumpbin.exe" /exports .\basictest_x64.dll