Skip to content

lthamsen/cpp_weather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cpp_weather

This project presents a small example describing how to make api calls using libcurl, the example is nearly completely based on this curl example. An example for parsing json formatted responses is also provided using nlohmann/json. Example api calls are made to chubin/wttr.in.

Dependencies needed to build the project

  • The newest version of clang or gcc is recommended.
    • The project should compile as long as your compiler supports c++11.
  • cmake > 3.6
  • libcurl

You will have to figure out how to install those dependencies, for your specific system, on your own!

Build and run the project

This example applies on Mac-os and Linux. I do not know how one would build and run this project using Windows. I do suggest to RTFM if you do not know either, and want to run the project on Windows.

To build project run:

mkdir build
cd build
cmake ..
make

The binary "cppWeather" should be found in the ./build directory. To run the project:

./cppWeather

About

Small test using nlohmann json library and wttr.in to get current weather information using c++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors