Has anyone else tried native compiling WriteFreely in Windows? I have and I'm stuck #664
Unanswered
tezoatlipoca
asked this question in
Questions / Support
Replies: 1 comment
-
Same here. I used Perplexity.ai to generate a "load and test sqlite driver" script. This lead to a new error that indicates that Go itself needs to be compiled with sqlite support (?) Or that // test-sqlite.go
package main
import (
"database/sql"
"fmt"
"log"
_ "github.com/mattn/go-sqlite3"
)
func main() {
db, err := sql.Open("sqlite3", ":memory:")
if err != nil {
log.Fatal(err)
}
defer db.Close()
err = db.Ping()
if err != nil {
log.Fatal("Error connecting to the database:", err)
}
fmt.Println("Database connection successful")
} Results
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Having read that the windows build done through the xgo container cross compiler is still bork I thought I'd try and compile natively in Windows.
So - following: https://writefreely.org/docs/latest/developer/setup
v0.13.2
which is the version I have running in linux so I could do apples 2 apples.go get -u github.com/go-bindata/go-bindata/...
works.go-bindata -pkg writefreely -ignore=\\.gitignore schema.sql sqlite.sql
- OK:15314 bindata.go
go build -v -tags='sqlite' ./cmd/writefreely/
So, including sqlite support I get this compile error:
Leaving OUT the sqlite3 support with just
go build -v ./cmd/writefreely/
works fine and I get a binary:BUT, fire up MySQL, create the schema with
CREATE DATABASE writefreely CHARACTER SET latin1 COLLATE latin1_swedish_ci;
, we get this when we try andwritefreely db init
:Now, I can create the schema manually by importing the
schema.sql
directly and THAT works, though I get a bunch of1681 integer display width is deprecated and will be removed in a future release
warnings.So firing up writefreely, it starts and listens but:
Any ideas? I'm slowly unrusting some very ancient developer skills here and my Go is nonexistent, Ill keep plugging away at it, but I feel either of these problems are something more familiar with the package cough @thebaer cough would take a look at and know what is wrong immediately or give me a hint. Really would prefer to get this package building in Windows, its just a more convenient development envirofor me.
Beta Was this translation helpful? Give feedback.
All reactions