I am attempting to use libmagic
in a rust project, using the magic rust crate which provides rust bindings for the libmagic
C library. Instructions say to install libmagic using vcpkg
, which is seemingly supposed to bring with it the .so
or .a
files that the rust binding expects to find. However, my installation seems to have only .c
and .h
files, causing linker errors when I try to compile. It does contain magic.lib
, but the linker can’t seem to find that either, even when I properly set the MAGIC_DIR
and VCPKG_ROOT
environment variables.
Why does my installation not have these compiled libraries? Do I need to compile them myself? If so, how? What do I need to do to get the rust binding working?