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

LINK : fatal error LNK1181: cannot open input file 'vlc.lib' #10

Open
tuaris opened this issue Jun 27, 2020 · 7 comments
Open

LINK : fatal error LNK1181: cannot open input file 'vlc.lib' #10

tuaris opened this issue Jun 27, 2020 · 7 comments

Comments

@tuaris
Copy link

tuaris commented Jun 27, 2020

Using the instruction on README.md. I added to the bottom of Cargo.toml

[dependencies]
vlc-rs = "0.3"

Then copy pasted the example to main.rs. Build on Windows fails with:

LINK : fatal error LNK1181: cannot open input file 'vlc.lib'

I do have VLC installed

@fschutt
Copy link

fschutt commented Jul 30, 2020

@tuaris I've forked this repo and changed it to use dynamic loading instead of static linking: https://github.com/fschutt/vlc-static-rs

The vlc.lib doesn't exist on Windows, so I just loaded the functions from the libvlc.dll and libvlccore.dll from the 3.0.11 release, downloaded from the VLC installation. In order for vlc-static-rs to work, you can clone the repo and run cargo run --example test -- "mymovie.mp4". Plus you need to copy the /plugins directory (where are the video codecs are) from C:\Program Files\VideoLan\VLC to vlc-static-rs/target/debug/examples. Then it'll run on Windows, too, otherwise you'll just get an initialization error when running the example.

@PDFergus
Copy link

@tuaris I've forked this repo and changed it to use dynamic loading instead of static linking: https://github.com/fschutt/vlc-static-rs

The vlc.lib doesn't exist on Windows, so I just loaded the functions from the libvlc.dll and libvlccore.dll from the 3.0.11 release, downloaded from the VLC installation. In order for vlc-static-rs to work, you can clone the repo and run cargo run --example test -- "mymovie.mp4". Plus you need to copy the /plugins directory (where are the video codecs are) from C:\Program Files\VideoLan\VLC to vlc-static-rs/target/debug/examples. Then it'll run on Windows, too, otherwise you'll just get an initialization error when running the example.

How would this work in regards to our own custom scripting. for instance would i just move the plugins directory or would i need to do more as well?

@fschutt
Copy link

fschutt commented Oct 14, 2022

@PDFergus you just bundle everything your plugins inside of the app and use include_bytes!() to package it into the final binary. Then you unpack it when the user starts the application.

@prayag17
Copy link

Any fix for this?

@fschutt
Copy link

fschutt commented Apr 18, 2023

@prayag17 yeah, use vlc-static-rs instead of vlc-rs, because the former includes the vlc.lib file as part of the distribution

@prayag17
Copy link

prayag17 commented Apr 18, 2023

I found vlc.lib, it is present inside the SDK folder. But I am having other issues when running it

@felixmaker
Copy link

vlc-rs uses vs to export .lib from .dll. The code in crates.io failed to work. I use it directly from git:

[dependencies.vlc-rs]
git = "https://code.videolan.org/videolan/vlc-rs.git"

It just works for me!

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

5 participants