Repository navigation
Any pointers on getting this to build on windows? #640
Answered
by
ismaildasci
rupakhetibinit
asked this question in
Q&A
|
I've set up llvm-config as well but now linking fails with error that says something like libxml2s.lib is not found |
Answered by
ismaildasci
Jan 17, 2026
Replies: 1 comment
|
on windows with mingw, llvm and libxml2 linking can be tricky. the error about libxml2s.lib means llvm was built expecting msvc static libraries but youre using mingw. few options:
cmake .. -G "MinGW Makefiles" \
-DLLVM_ENABLE_LIBXML2=OFF
pacman -S mingw-w64-x86_64-libxml2then set cmake to find it: cmake .. -DLIBXML2_INCLUDE_DIR=/mingw64/include/libxml2 \
-DLIBXML2_LIBRARY=/mingw64/lib/libxml2.dll.a
$env:LLVM_SYS_180_PREFIX = "C:\path\to\llvm"
$env:LLVM_CONFIG_PATH = "C:\path\to\llvm\bin\llvm-config.exe"
inkwell = { version = "0.5", features = ["llvm18-0"] }
rustup default stable-x86_64-pc-windows-msvcmsvc is better supported for llvm on windows. |
0 replies
Answer selected by
rupakhetibinit
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
on windows with mingw, llvm and libxml2 linking can be tricky. the error about libxml2s.lib means llvm was built expecting msvc static libraries but youre using mingw.
few options:
use prebuilt llvm for mingw. download from llvm releases page, get the mingw64 version specifically.
if building llvm yourself, disable libxml2:
cmake .. -G "MinGW Makefiles" \ -DLLVM_ENABLE_LIBXML2=OFFthen set cmake to find it:
$env:LLVM_SYS_180_…