I am trying to use cgo to link go with c library. I put the lib file in the same folder with go and write #cgo LDFLAGS: -L. -llpsolve55 (i am using windows and the library i want to link is lpsolver). However, when I build the go file the error message shows as below:
./lpsolve55.lib: error adding symbols: File in wrong format
collect2.exe: error: ld returned 1 exit status
I’ve already read the cgo document and some online tutorials and still cannot find solution. Thanks for the help.