Everything you need to set up, build, test, and run the Weather CLI on Windows.
Complete first-time setup takes 5–15 minutes.
Tools required:
| Tool | Version | Install |
|---|---|---|
| MinGW GCC | 11 or later | choco install mingw |
| CMake | 3.20 or later | choco install cmake |
| libcurl | any recent | choco install curl |
If you don't have Chocolatey, install it first by running this in PowerShell as Administrator:
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))scripts\setup-windows.batThis script installs Chocolatey (if absent), then MinGW GCC, CMake, and libcurl.
g++ --version # GCC 11 or later
cmake --version # 3.20 or later
curl --version # any recent versionUse mingw32-make (ships with MinGW) from the project root:
mingw32-make buildExecutable: build\weather_cli.exe
All available targets:
| Command | What it does |
|---|---|
mingw32-make build |
Debug build (default) |
mingw32-make release |
Optimised release build |
mingw32-make test |
Build and run all unit tests |
mingw32-make run CITY=Paris |
Build and run for a city |
mingw32-make clean |
Delete the build/ directory |
mingw32-make help |
Show all targets |
build\weather_cli.exe London
build\weather_cli.exe "New York" --fahrenheit
build\weather_cli.exe Tokyo --extended
build\weather_cli.exe --helpNo API key required. The project uses OpenMeteo, which is free and requires no registration.
mingw32-make testExpected output:
100% tests passed, 0 tests failed out of 1
All tests passed
Or run the test binary directly:
build\tests\weather_cli_tests.exeIf you prefer to call CMake directly (without the Makefile):
cmake -B build -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=g++ -DCMAKE_MAKE_PROGRAM=mingw32-make -DCMAKE_BUILD_TYPE=Debug
cmake --build build -j 4When you open the project, click Install All for recommended extensions, or install manually:
- C/C++ (
ms-vscode.cpptools) — IntelliSense, debugging - CMake Tools (
ms-vscode.cmake-tools) — CMake integration - CMake (
twxs.cmake) — CMake language support
Optional:
- GitHub Copilot (
github.copilot) - GitHub Copilot Chat (
github.copilot-chat)
code .Or File → Open Folder and select the copilot-cpp directory.
Press Ctrl+Shift+B (runs the default CMake build task).
- Open
src/main.cpp - Click the left margin to set a breakpoint
- Press
F5→ select Debug Weather CLI (Windows)
Click the Testing icon in the Activity Bar (flask) → click the play button to run all tests.
choco install cmake mingw
refreshenvClose the terminal, open a new one, then retry.
choco install curl
mingw32-make clean
mingw32-make buildIf curl was upgraded and the version number in the Chocolatey path changed, update the curl path in:
CMakeLists.txt(root —set(CURL_ROOT ...))tests/CMakeLists.txt(set(CURL_DLL ...))
The build system copies libcurl-x64.dll automatically to both build/ and build/tests/. If you see a missing DLL error, copy it manually:
copy "C:\ProgramData\chocolatey\lib\curl\tools\curl-8.19.0_1-win64-mingw\bin\libcurl-x64.dll" build\tests\Right-click Command Prompt and select Run as administrator, then run scripts\setup-windows.bat.
- Build first:
Ctrl+Shift+B Ctrl+Shift+P→ C/C++: Reset IntelliSense Database- Restart VS Code if needed.
REM First time only — run as Administrator:
scripts\setup-windows.bat
REM Every day:
mingw32-make build # build
mingw32-make test # run tests
mingw32-make run CITY=Tokyo # run the app
mingw32-make clean # clean build directory- README.md — Architecture and full project overview
- VSCODE_SETUP.md — Detailed VS Code configuration