Senyokbalgul
Senyokbalgul

Reputation: 1102

How to install ninja-build for C++

https://github.com/ninja-build/ninja/releases

I have downloaded the ninja-win.zip folder and extracted it. When I open it, there is a single .exe file in the entire folder. When I double click it a cmd window flashes for a split second. I have also tried running it as administrator, but the same thing happens. What I don't understand is, what am I expected to do with this .exe file?

Upvotes: 17

Views: 84343

Answers (4)

bzhu
bzhu

Reputation: 954

For Ubuntu: apt install ninja_build

Upvotes: -1

Abdul ahad
Abdul ahad

Reputation: 1433

You can simple download ninja.exe file from this Link

https://github.com/ninja-build/ninja/releases

After that you just have to add the path to your ninja.exe file to your windows environment variables and then you can use ninja commands from anywhere in windows.

Upvotes: 7

RishiNandha Vanchi
RishiNandha Vanchi

Reputation: 141

1. Open cmd in your Project Directory

2. There are guides on the internet on where to save the Ninja.exe so that it'll be callable in Cmd without specifying directory. Either follow them or:

i, Specify Directory when Calling Ninja. Putting "ninja" in Cmd actually calls Ninja.exe and is the same as something like "C:\users\user1\downloads\Ninja". or:

ii, Save Ninja.exe in the same directory as Project.

3. proceed with rest of the command.

Therefore the Final Command would be:

"C:\users\user\downloads\Ninja.exe" -f "D:\Projects\Project1"

Upvotes: 4

JeremiahB
JeremiahB

Reputation: 916

You must open a terminal (cmd.exe on Windows) and type something like ninja -f /path/to/buld/file. You may also wish to modify the PATH environment variable so that Windows knows where to find the Ninja executable, depending on your setup.

Upvotes: 10

Related Questions