-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error building go app : undefined: SQLiteConn #327
Comments
can't reproduce this. what is different from general situation? |
I have used the test code under "Quickstart" from https://github.com/go-gorp/gorp I used "github.com/mattn/go-sqlite3" and it build and installed fine Any other info you need Matt? This is the error at the end of "go build test.go" |
please try with |
What about |
D:\Working\go\src\github.com\mattn\go-sqlite3>go env |
But not? Is this an issue related on tests? |
D:\Working\go\src\github.com> That is what I meant Matt, I did not get any errors when I installed it |
Okay, then what is remaining issue? |
Matt, I think if is a cross compiler issue this does not: D:\Working\go\src\local\syslog-connector-go>set GOOS=linux D:\Working\go\src\local\syslog-connector-go>go build -v test.go |
Further.. D:\Working\go\src\local\syslog-connector-go>go build -v test.go |
I think it is because cgo not supported for cross compilation in Go, I will move my dev environment to a linux container. |
On Linux I am unable to compile without cgo. Is there any solution to this?
|
go-sqlite3 require ENABLE_CGO=1 |
to be more clear CGO_ENABLED=1 is needed. |
using ubuntu 18.04 command :
error :
|
@codenoid You need to set CC to a valid Windows cross compiler. By default you are using the one for your host (Linux). |
@rittneje yea, just successfully compile my application in target host (windows) |
....\github.com\mattn\go-sqlite3\tracecallback_noimpl.go:7: undefined: SQLiteConn
OS: Windows 10 Pro 64
c++ compiler framework: MinGW64
The text was updated successfully, but these errors were encountered: