尝试在Go中使用C包装器?

huangapple go评论75阅读模式
英文:

Trying to use C wrapper in Go?

问题

我必须有所遗漏,但我正在尝试使用为此目的创建的C包装器在Go中使用Leptonica C库:

https://github.com/GeertJohan/go.leptonica/blob/master/leptonica.go

但是我不明白...它允许我导入文件,但是我如何实际调用Leptonica函数呢?(具体来说,我想使用Leptonica检测图像的去倾斜。)

我在Go包装器中没有看到任何允许我发送这样命令的函数。我该如何与它进行通信?

英文:

I must be missing something but I'm trying to use the Leptonica C library in Go using a C wrapper that was made for that purpose:

https://github.com/GeertJohan/go.leptonica/blob/master/leptonica.go

But I don't understand... it allows me to import files but then how do I actually invoke the Leptonica functions? (Specifically I want to detect the deskew of the image using Leptonica.)

I don't see any function in the Go wrapper that allows me to send a command like this. How do I talk to it?

答案1

得分: 1

go.leptonica 简单地没有实现那个功能。你需要自己调用 C 函数。

可以使用 leptonica.go 作为起点,编写你自己的包装器。

英文:

go.leptonica simply hasn't implemented that. You'll have to call the C functions yourself.

Use leptonica.go as a starting point, and write your own wrapper.

huangapple
  • 本文由 发表于 2014年10月2日 23:36:36
  • 转载请务必保留本文链接:https://go.coder-hub.com/26164348.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定