英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论