Skip to content

Problem connecting llama.cpp in Visual Studio C++ project #11359

Answered by bandoti
originalini asked this question in Q&A
Discussion options

You must be logged in to vote

Hello—

What you are looking for I believe is to specify the Visual Studio CMake generators. The nice thing about CMake is that it creates the Visual Studio solution automatically and all you have to do is double-click it!

So an off-the-cuff idea, open cmd.exe and:

cd llama.cpp
mkdir build & cd build
cmake .. -G "Visual Studio 17 2022" -A x64

And this will generate the solution file. You can build from the command line after with cmake --build . or simply open the solution file and build, debug, etc.

Note: this assumes x64 architecture but other ones can be specified.

https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2017%202022.html

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by originalini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants