-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Cannot build basic player example #105
Comments
Hi @stevstrong, It looks like you don't have the Go to the directory with the source code for the example. go mod init main
go mod tidy Then you should be able to build the project. go build
./main |
Thanks, sorry for the late reply, but it is still not ok. What I did:
reply:
reply:
At this point this is the content of the
Then:
reply:
I think I am still missing something but cannot figure out what... ### EDIT
|
You should not call the module the same as your file because the name of the executable generated after build will be called that as well and it will effectively replace your source file. The name of the module can be anything ( I think you mentioned you tried building on Here are the exact steps: mkdir player
cd player
curl "https://raw.githubusercontent.com/adrg/libvlc-go-examples/master/v3/player/player.go" -o main.go
go mod init main
go mod tidy
go build
./main Assuming this worked, the project can be moved exactly as is on |
does the path where the source code is compared to GOPATH matter? Because funnily VS code also points those functions as "undefined". |
No, when using Did you get the chance to try building on Linux, using the steps in my previous response? |
On Linux go build fails with the same message as on Windows. |
I'm not sure. There must be something weird going on with your setup. Can you post the output of One thing I noticed from your |
I did on Windows:
and retried build with this output:
Strange that now VS Code does not show me any error anymore |
Alright, so that was the problem. Now you can follow the instructions on the wiki in order to install the prerequisites: |
Ah, I somehow overlooked this step on Win. I will try it and post here the result. I also have to look why it does not work on Linux, I think the prerequisites were loaded there already. |
Most likely |
I acknowledge, on Linux the After I ran: Maybe it makes sense to extend the read.me with this information to help other users like me. |
Hello, I have a similar problem, but it gives me this error: # github.com/adrg/libvlc-go/v2
..\..\..\go\pkg\mod\github.com\adrg\libvlc-go\v2@v2.1.4\av.go:4:11: fatal error: vlc/vlc.h: No such file or directory
4 | // #include <vlc/vlc.h>
| ^~~~~~~~~~~
compilation terminated. I have all the prerequisites installed, I have the latest version of Go and I am using Windows. What I can do? |
Hi,
as also posted here, the build command for basic player example outputs on Win10 and Debian 11:
Any idea what I am missing?
The text was updated successfully, but these errors were encountered: