Why Is bitnet.cpp Failing to Build on Windows Even With Visual Studio and Clang Installed? #184
-
I’m trying to build bitnet.cpp on Windows using Visual Studio 2022 and Clang as recommended. I’ve installed all required components like CMake, Clang, and MS-Build Support for LLVM-Toolset. However, when I run the build commands in PowerShell, I get errors related to missing standard libraries and unresolved references in log.cpp, particularly with std::chrono. I already tried updating LLVM and CMake. Is there something wrong with how my environment is configured, or do I need to use a specific type of shell to compile properly? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is a common issue caused by building from a standard PowerShell or terminal window instead of a properly initialized development shell. On Windows, bitnet.cpp requires you to build from a Visual Studio Developer Command Prompt or use PowerShell with the Visual Studio DevShell module loaded. This ensures all paths to Clang, standard libraries, and build tools are correctly set. The error with std::chrono in log.cpp is known and has been addressed in recent commits—pull the latest version of the repo to get the fix. For best results, open a Developer Command Prompt for VS2022 and run the full build sequence from there. |
Beta Was this translation helpful? Give feedback.
This is a common issue caused by building from a standard PowerShell or terminal window instead of a properly initialized development shell. On Windows, bitnet.cpp requires you to build from a Visual Studio Developer Command Prompt or use PowerShell with the Visual Studio DevShell module loaded. This ensures all paths to Clang, standard libraries, and build tools are correctly set. The error with std::chrono in log.cpp is known and has been addressed in recent commits—pull the latest version of the repo to get the fix. For best results, open a Developer Command Prompt for VS2022 and run the full build sequence from there.