如何在Windows上为Haskell安装Jack绑定

时间:2019-04-02 23:07:39

标签: windows haskell cabal jack

我正在尝试在Windows上为Haskell设置Jack绑定(请参见https://www.stackage.org/package/jackhttp://hackage.haskell.org/package/jack)。

我已经安装了Jack for Windows(来自http://jackaudio.org/downloads/)。但是,无论我将case设置为什么,我仍然会遇到$ bash student.sh What is your name? John What is your score on the Assignment? 78 What is your score on the Quiz? 80 What is your score on the Midterm Exam? 80 What is your score on the Final Exam? 80 total: 7940 avg : 79 rounded avg: 79 John's grade is an 'B' 错误。

所以,即使我跑步

func GenerateToken(uid, cid int64) string{
    header := `{"alg": "HS256","typ": "JWT"}`
    header = base64.URLEncoding.EncodeToString([]byte(header))
    var b structs.JwtBody
    b.UID = uid
    b.CID = cid
    body, _ := json.Marshal(b)
    key := []byte(secret)
    h := hmac.New(sha256.New, key)
    h.Write([]byte(header + "." + body))
    signature := base64.URLEncoding.EncodeToString(h.Sum(nil))
    jwt := header + "." + body + "." + signature
    return jwt
}

我仍然收到错误消息。不过,添加h.Write([]byte(header + "." + body)) 部分确实可以解决--extra-lib-dirs错误。

我尝试在Missing (or bad) C library: jack的msys安装上安装pkg-config,该错误修复了当我不使用cabal install jack --extra-include-dirs="C:\Program Files (x86)\Jack\includes" --extra-lib-dirs="C:\Program Files (x86)\Jack" --extra-lib-dirs="C:\Program Files (x86)\Jack\lib" --extra-lib-dirs="C:\Windows\jack" 时发生的错误,但是没有解决其他问题。我也尝试用MinGW编译Jack,但我不知道怎么做。

我缺少的库文件有一些位置吗?还是为MinGW提供了一些具有所需库文件的软件包?

0 个答案:

没有答案