在cgo LDFLAGS中包含.lib或.la库

I am trying to include the libOsi.lib or libOsi.la files from the COIN-OR project to my cgo project on Windows. The libraries are installed and in the correct folder.

// #cgo LDFLAGS: -lOsi
// #include "test.h"
import "C"

Error when compiling:

c:/winbuilds/....../bin/ld.exe: cannot find -lOsi
collect2.exe: error: ld returned 1 exit status

To test if the file is actually in the correct folder I changed the extension to .dll.a and ld then found it - but of course complaining that the file type could not be detected.

It seems like ld cannot use .lib or .la files. Is there a way to inlcude those?