dsklzerpx64815631 2019-04-15 02:07 采纳率: 100%
浏览 120

Go sqlite无法在Mac OSX上构建/编译

i always fail to compile simple Go code every call or use sqlite library. i use go version 1.9.7 and osx mojave (10.14.3)

sample code :

package main

import (
    "fmt"
    "github.com/jmoiron/sqlx"
    _ "github.com/mattn/go-sqlite3"
)

func main() {
    fmt.Print("connecting.")
    db := sqlx.MustConnect("sqlite3", ":memory:")
    db.Ping()
    fmt.Print("connected")
}

always getting this error

# command-line-arguments
/usr/local/go/pkg/tool/darwin_amd64/link: /usr/local/go/pkg/tool/darwin_amd64/link: combining dwarf failed: Unknown load command 0x32 (50)

any idea ?

  • 写回答

1条回答 默认 最新

  • douyiken0968 2019-04-15 08:47
    关注

    We struggled with that problem for a while . We came to this solution to make the whole library as go plugin and compile it on a linux system and use it in other operating systems.

    评论

报告相同问题?

悬赏问题

  • ¥15 maixpy训练模型,模型训练好了以后,开发板通电会报错,不知道是什么问题
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 有没有帮写代码做实验仿真的
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容
  • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题