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

Usage of this module is expecting VLC's SDK's header file explicitly, Am I missing something? #126

Open
TasleemaShaik opened this issue Mar 5, 2025 · 2 comments

Comments

@TasleemaShaik
Copy link

Hello,

I'm trying to use this package for my small Go project I have been trying to implement.

When I'm trying to use this package, program is expecting VLC SDK need to be available for one of it's header file. I'm still trying to debug if any work around is available. Just for the reference, I'm creating this.

The part of the code I'm trying to use

if err := libvlc.Init("--quiet"); err != nil {
	log.Fatal(err)
}
defer libvlc.Release()
player, err := libvlc.NewPlayer()
if err != nil {
	log.Fatal(err)
}
defer player.Stop()
media, err := player.LoadMedia("sample.mp4")
if err != nil {
	log.Fatal(err)
}
defer media.Release()

Error I'm facing

 go build
# github.com/adrg/libvlc-go/v3
..\..\..\..\go\pkg\mod\github.com\adrg\libvlc-go\[email protected]\av.go:4:11: fatal error: vlc/vlc.h: No such file or directory
    4 | // #include <vlc/vlc.h>
      |           ^~~~~~~~~~~
compilation terminated.

The line of code that is giving this failure

// #include <vlc/vlc.h>

Image
@adrg
Copy link
Owner

adrg commented Mar 6, 2025

Hi @TasleemaShaik,

You are not missing anything. On your development machine, you need to have the libVLC SDK (shared libraries and header files) installed in order to compile any application using this library. There isn't really a way around that.

If you want to redistribute your already built application, then you would only need to bundle your binary and the libVLC shared libraries. Of course, this is dependent on the operating system you are targeting. On Windows for example, you can just distribute your compiled binary and libvlc.dll (in the same directory as your binary).

Please see the Prerequisites section in the README for information on how to install the libVLC SDK on different operating systems.

@TasleemaShaik
Copy link
Author

Hi @adrg,

Thank you so much for the reply.

That's right. I was trying that actually. There are some other issues for executing the code from README itself.
(i) Incompatibility of libVLC SDK and App versions.
(ii) Linker errors because NuGet package provides DLLs (and possibly MSVC‑style import libraries) instead of the MinGW‑compatible import libraries that GCC expects when we use the -lvlc flag.

Once I figure out, will update here clearly and close the issue.

Thanks,
Tasleema.

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