Open rittneje opened 2 years ago
I'm experimentally trying if the C code can be moved to amagramation but seems not to be easy.
https://github.com/mattn/go-sqlite3/tree/move-code
c:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: $WORK\b001\_x005.o:sqlite3.cgo2.c:(.rdata$.refptr.sqlite3_version[.refptr.sqlite3_version]+0x0): undefined reference to `sqlite3_version' collect2.exe: error: ld returned 1 exit status
In #294, the sqlite3-binding.c, etc. files were moved out of a sub-directory for better compatibility with tools like godep. This in turn caused issues with the libsqlite3 build tag due to the way cgo works, which necessitated that the amalgamation files be manually patched to include an
#ifndef USE_LIBSQLITE3
check. This manual patch then must be re-inserted each time we upgrade SQLite.As godep, etc. are likely no longer maintained in the wake of go mod, we should revisit this point. If the files are moved back to a sub-directory, will it still work properly with go mod? Can we stop having to manually patch the amalgamation files?