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

Support for the MSVC toolchain on Windows #70

Closed
tzachshabtay opened this issue Mar 17, 2017 · 4 comments · Fixed by aMDI-Projects/pcap#1
Closed

Support for the MSVC toolchain on Windows #70

tzachshabtay opened this issue Mar 17, 2017 · 4 comments · Fixed by aMDI-Projects/pcap#1

Comments

@tzachshabtay
Copy link

Hi, is the default toolchain on windows (MSVC) supported?
When using it (on Windows7 64bit), I got:
fatal error LNK1181: cannot open input file 'wpcap.lib'

This happened both with the official installation (WinPCap 4.1) and when I tried to use a pre-compiled dll from VS2008 (from here: https://github.com/patmarion/winpcap/tree/master/Lib/x64).
When I moved to the gnu toolchain it compiled fine, but I'm worried I won't be able to use other libraries as I'm using the not recommended toolchain.

Thanks.

@aldanor
Copy link
Collaborator

aldanor commented Mar 17, 2017

Hi @tzachshabtay, I don't see why it wouldn't work. Could you post more details so it's reproducible? (where's your wpcap.lib located, etc)

@ebfull I think it may be worthwhile setting up an AppVeyor build alongside Travis, to test both mingw and msvc toolchains? (given that neither of main developers of this crate use windows as a primary os)

@Trolldemorted
Copy link
Contributor

Trolldemorted commented Apr 19, 2017

Are the build instructions correct?

I got pcap and pnet to run on W10 (with msvc), but i had to download the WinPcap Developer's Pack and add the .lib files to my LIB path, otherwise the linker is unable to find them.

Also the instructions don't fit to rustup's workflow, i have to say. Nevertheless, shouldn't moving the libs into LIB and the dlls into PATH suffice for all usecases?

@tzachshabtay
Copy link
Author

Hi, sorry, I missed the question when it was originally asked. I didn't have a wpcap.lib, but a wpcap.dll which I placed in the folder as instructed in the readme, both in my rustup toolchains folder (C:\Users\my_user.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib), and I think I also tried using the gnu folder (C:\Users\my_user.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-gnu\lib, this worked when I switched to the gnu toolchain) and also desperately tried to literally put it in the folder you wrote in the readme (C:\Rust\bin\rustlib\x86_64-pc-windows-gnu\lib). I'm afraid I won't be able to offer more help, the rust experiment in my office was shut down.. :(

@sekineh
Copy link
Collaborator

sekineh commented Aug 28, 2020

Now Windows CI is set up using MSVC toolchain (PR #117).

It also mentions LIB environment variable in README which is needed to avoid the following error:

fatal error LNK1181: cannot open input file 'wpcap.lib'

@sekineh sekineh closed this as completed Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants