- install vcpkg:
new dictionary: c:\vcpkg
cd vcpkg
git clone https://github.com/microsoft/vcpkg.git
.\bootstrap-vcpkg.bat
- install packages: .\vcpkg install curl
- environmental variables: VCPKG_ROOT=C:\vcpkg; VCPKG_DEFAULT_TRIPLET=x64-windows; PATH+= C:\vcpkg
- integrate in VS (Powershell-Developer Conmsole): vcpkg integrate install
- add library to project: VC Directories/Include Dirs (VC++-Verzeichnisse(Includeverzeichnisse): C:\vcpkg\packages\curl_x64-windows\include
Link to Tutorial Eigen Compile
- download EIGEN source: https://gitlab.com/libeigen/eigen/-/releases/3.4.0
- unzip to: "C:\Binaries\eigen-3.4.0" (no compiling needed!)
- In Visual Studio, make a new project: (
File | New | C++ Empty Project) - Paste sample code:
#include <iostream>
#include <Eigen/Dense>
using Eigen::MatrixXd;
int main()
{
MatrixXd m(2, 2);
m(0, 0) = 3;
m(1, 0) = 2.5;
m(0, 1) = -1;
m(1, 1) = m(1, 0) + m(0, 1);
std::cout << m << std::endl;
}- Visual Studio > Project > Properties > C/C++ (
Additional Include Directories: "C:\Binaries\eigen-3.4.0\")
Link to JSON Library
- Paste sample code:
#include <fstream>
#include <iostream>
#include "json\json.h"
using namespace std;
using namespace Json;
//1. If file exists, read from file
std::string filePath = "setting.json";
JsonWrapper s;
cout << "is file: " << s.isFile(filePath);
- run amalgamate.py, source and header files are created in "dist" directory
- copy and include files in "dist" folder within your project
- use the created JsonWrapper class!
- Visual Studio > Project > Properties > C/C++ (
Additional Include Directories: "C:\Binaries\eigen-3.4.0\") - (Visual Studio > Project > Properties > Linker > General(
Additional Library Directories: "C:\Binaries\json-develop) --> not needed!!) - Click Linker and add the Libraries Search Path
#Links https://stackoverflow.com/questions/58401595/reading-a-json-file-with-jsoncpp
amalgated include directly: https://github.com/open-source-parsers/jsoncpp https://stackoverflow.com/questions/26768639/jsoncpp-to-visual-studio
Form Layout: https://www.youtube.com/watch?v=gWa2rqe8l6E&t=237s
