case "windows":
ext = "dll"
args = append(args, "-DEXPORT_DLL")
+ // At least in mingw-clang it is not permitted to just name a .dll
+ // on the command line. You must name the corresponding import
+ // library instead, even though the dll is used when the executable is run.
+ args = append(args, "-Wl,-out-implib,libcgosotest.a")
case "aix":
ext = "so.1"
}
#cgo solaris LDFLAGS: -L. -lcgosotest
#cgo netbsd LDFLAGS: -L. libcgosotest.so
#cgo darwin LDFLAGS: -L. libcgosotest.dylib
-#cgo windows LDFLAGS: -L. libcgosotest.dll
+#cgo windows LDFLAGS: -L. libcgosotest.a
#cgo aix LDFLAGS: -L. -l cgosotest
void init(void);
case "windows":
ext = "dll"
args = append(args, "-DEXPORT_DLL")
+ // At least in mingw-clang it is not permitted to just name a .dll
+ // on the command line. You must name the corresponding import
+ // library instead, even though the dll is used when the executable is run.
+ args = append(args, "-Wl,-out-implib,libcgosotest.a")
case "aix":
ext = "so.1"
}
#cgo solaris LDFLAGS: -L. -lcgosotest
#cgo netbsd LDFLAGS: -L. libcgosotest.so
#cgo darwin LDFLAGS: -L. libcgosotest.dylib
-#cgo windows LDFLAGS: -L. libcgosotest.dll
+#cgo windows LDFLAGS: -L. libcgosotest.a
#cgo aix LDFLAGS: -L. -l cgosotest
#include "cgoso_c.h"