git clone https://github.com/songwenhao/CppLearningRecord
Before proceeding with the following steps, you must have installed Visual Studio 2022 in your computer!
Open Visual Studio Command Prompt
see. https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170
- x86 Native Tools Command Prompt - Sets the environment to use 32-bit, x86-native tools to build 32-bit, x86-native code.
- x64 Native Tools Command Prompt - Sets the environment to use 64-bit, x64-native tools to build 64-bit, x64-native code.
- x86_x64 Cross Tools Command Prompt - Sets the environment to use 32-bit, x86-native tools to build 64-bit, x64-native code.
- x64_x86 Cross Tools Command Prompt - Sets the environment to use 64-bit, x64-native tools to build 32-bit, x86-native code.
change Visual Studio Command Prompt path to current project path
// no proxy
3rdparty\build-all.cmd %cd%
// use proxy
3rdparty\build-all.cmd %cd% proxy 127.0.0.1:7890
// also support build single library
3rdparty\build-cjson.cmd %cd%
mkdir cmake-out
cmake -B .\cmake-out -S . -G "Visual Studio 17 2022" -T v143
Open CppLearningRecord.sln
chmod +x ./build_3rdparty_libraries.sh
./build_3rdparty_libraries.sh
mkdir cmake-out
cd cmake-out
cmake -B . -S ..