mxk / go-sqlite

SQLite Library for Go
BSD 3-Clause "New" or "Revised" License
59 stars 20 forks source link

Link Error (I Think), On Windows #7

Closed egordon closed 10 years ago

egordon commented 10 years ago

Hello mxk! I tried to figure this one out, but I'm stumped.

go test github.com\mxk\go-sqlite\sqlite3 throws the following error:

# testmain
github.com/mxk/go-sqlite/sqlite3(.text): undefined: github.com/mxk/go-sqlite/sqlite3(/575)
github.com/mxk/go-sqlite/sqlite3(.text): undefined: github.com/mxk/go-sqlite/sqlite3(/735)
github.com/mxk/go-sqlite/sqlite3(.text): undefined: github.com/mxk/go-sqlite/sqlite3(/706)
FAIL    github.com/mxk/go-sqlite/sqlite3 [build failed]

According to go test -x, it appears right after the this link command:

"C:\\Go\\pkg\\tool\\windows_amd64\\6l.exe" -o "C:\\Users\\Ethan\\AppData\\Local\\Temp\\go-build891999531\\github.com\\mxk\\go-sqlite\\sqlite3\\_test\\sqlite3.test.exe" -L "C:\\Users\\Ethan\\AppData\\Local\\Temp\\gobuild891999531\\github.com\\mxk\\go-sqlite\\sqlite3\\_test" -L "C:\\Users\\Ethan\\AppData\\Local\\Temp\\go-build891999531" -L "C:\\Users\\Ethan\\Documents\\Github\\emp\\pkg\\windows_amd64" -w -extld=gcc "C:\\Users\\Ethan\\AppData\\Local\\Temp\\go-build891999531\\github.com\\mxk\\go-sqlite\\sqlite3\\_test\\main.a"

I'm not even sure how to read this, is it some undefined symbol the .text section?

Software

Thank you very much!

egordon commented 10 years ago

Everything appears to work after just switching GOARCH to 386 and running C:\Go\src\make.bat. I guess I'll have to pass up on a 64-bit application for now.

mxk commented 10 years ago

I just updated my go installation 1.3.1 and tested the package. Everything seems to work fine. Are you saying that error returns if you undefine GOARCH and rebuild go?

egordon commented 10 years ago

Sorry, forgot to check back on this! Actually, rebuilding go with GOARCH specified as amd64 seemed to work just fine. Must have been some sort of configuration error on my part. Thanks!