Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Build on Windows, relative to acces ffmpeg library #20

Open
Mirabeau2Code opened this issue Jul 14, 2020 · 1 comment
Open

Can't Build on Windows, relative to acces ffmpeg library #20

Mirabeau2Code opened this issue Jul 14, 2020 · 1 comment

Comments

@Mirabeau2Code
Copy link

Hello,

First, sorry for my bad english write..

I followed the install description on Linux without problems, however I have problems on Windows (10), and it is impossible for me to build the program on Win10.
The main problem, seem the only problem, is related to access to the FFmpeg library.

  • I discover "Go" and only have a few days of discovery
  • I do not control too much the options of building "C" program

-> i use MinGW 730_x64 (which I use without worries for other constructions with "Go", like for OpenCV)
-> The "ffmpeg" library come from the "pack" developer of the official website, and its installed in a "libs" folder
(!) there is no ".pc" file in this pack, useful for "pkg_config"
So...
I added the program "pkg_config" (and its dependencies) in my MinGW folder, it is taken into account during the construction.
I get ".pc" files from my linux (same library version) and "modified", by hand, the paths to correspond to the "libs" folder of my windows
I indicated in the variable "PKG_CONFIG_PATH" the folder of the files "
.pc" (and check that they are taken into account)
Without success, during the build, I always have an error to find the ffmpeg library.

So I tried to indicate the path of the libraries via the set variable CGO_CPPFLAGS ("-I") and CGO_LDFLAGS ("-L"), again without success.

I "resolve" somme error from "*.h" acces file (ffmpeg library), it's very bad method, i know ;), but at the end it was now some "linked" error i get...(sic)

My lack of knowledge "Go" and build options, prevents me from going further, however I remain convinced that I do not miss much :)

  • Is it possible not to use "pkg_config" and to indicate in another way where to find the libraries?
  • Is there an option, variable to fill in to "force" their file?
  • Is there a "new" installation method (for windows)

Thank you very much in advance for all "tracks" to succeed, finally, in compiling the "Go" program

@horgh
Copy link
Owner

horgh commented Jul 15, 2020

Hi!

I'm not familiar with building things on Windows unfortunately, so I am not sure I can help much.

Regarding not using pkg-config: I think that should be possible. You could delete the pkg-config line from videostreamer.go and rely entirely on changing the #cgo LDFLAGS and CFLAGS lines to tell Go how to build the C parts. It sounds like that is what you tried and had some success with. You would need to specify -L and -I flags correctly to where to find the libraries and headers for ffmpeg I believe. I don't know how to determine what you would enter unfortunately!

Sorry I'm not much help. This project is pretty rough around the edges though, so it may not suit your use case anyway!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants