Golang 1.12 compatibility


(Fookiwara) #1

Hello,
I try to use this mediainfo library wrapper:


but due to CGO, I cannot build under golang 1.12.
However, it works under 1.11…
Any idea?


(Johan Dahl) #2

Hi. It is pretty long time ago since it was updated

https://github.com/dreamCodeMan/go-mediainfo parses the xml output from the commandline. Could be a workaround but maybe slightly slower.

This does the same: https://github.com/cajax/yami

Rather rescent repo https://github.com/zelenin/go-mediainfo


(Fookiwara) #3

Yes, because it is slower, i prefer to use the library instead of command line. I m gonna try this package:


thanks!


(Fookiwara) #4

I have the following error:

github.com/zelenin/go-mediainfo

In file included from …/github.com/zelenin/go-mediainfo/mediainfo.go:3:
./mediainfo.h:5:10: fatal error: MediaInfoDLL/MediaInfoDLL.h: No such file or directory
#include <MediaInfoDLL/MediaInfoDLL.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.


(Johan Dahl) #5

Which operative system do you use? I think you have to download the DLL package and then put the dll (windows) or so-file (linux) at the correct place and the folder source / MediaInfoDLL somewhere in the include paths for your c compiler.


(Fookiwara) #6

Docker from alpine image…


(Fookiwara) #8

I have this error even with go 1.12.5:
github.com/jkl1337/go-mediainfo/mediainfo.go:73:22: identifier “_Ctype_char” may conflict with identifiers generated by cgo


(system) closed #9

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.