#include <iostream>
void main(int argc, char* argv[])
{
return 0;
}
Computing installation plan...
The following packages will be built and installed:
rapidjson[core]:x64-linux -> 2020-09-14
Detecting compiler hash for triplet x64-linux...
Could not locate cached archive: /home/sulfred/.cache/vcpkg/archives/16/16e324f00567b9fbcd2f106e12e631094b31b5de.zip
Starting package 1/1: rapidjson:x64-linux
Building package rapidjson[core]:x64-linux...
-- Downloading https://github.com/Tencent/rapidjson/archive/ce81bc9edfe773667a7a4454ba81dac72ed4364c.tar.gz -> Tencent-rapidjson-ce81bc9edfe773667a7a4454ba81dac72ed4364c.tar.gz...
-- Extracting source /home/sulfred/Documents/SoftwareDev/github/SulfredLee/DailyProblem/cpp/app/ProjectCreater/bin/TradingPlatform/Projects/vcpkg/downloads/Tencent-rapidjson-ce81bc9edfe773667a7a4454ba81dac72ed4364c.tar.gz
-- Using source at /home/sulfred/Documents/SoftwareDev/github/SulfredLee/DailyProblem/cpp/app/ProjectCreater/bin/TradingPlatform/Projects/vcpkg/buildtrees/rapidjson/src/c72ed4364c-35829b36f2.clean
-- Configuring x64-linux-dbg
-- Configuring x64-linux-rel
-- Building x64-linux-dbg
-- Building x64-linux-rel
-- Installing: /home/sulfred/Documents/SoftwareDev/github/SulfredLee/DailyProblem/cpp/app/ProjectCreater/bin/TradingPlatform/Projects/vcpkg/packages/rapidjson_x64-linux/share/rapidjson/copyright
-- Installing: /home/sulfred/Documents/SoftwareDev/github/SulfredLee/DailyProblem/cpp/app/ProjectCreater/bin/TradingPlatform/Projects/vcpkg/packages/rapidjson_x64-linux/share/rapidjson/usage
-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: /home/sulfred/.cache/vcpkg/archives/16/16e324f00567b9fbcd2f106e12e631094b31b5de.zip
Building package rapidjson[core]:x64-linux... done
Installing package rapidjson[core]:x64-linux...
Installing package rapidjson[core]:x64-linux... done
Elapsed time for package rapidjson:x64-linux: 1.485 s
Total elapsed time: 1.76 s
The package rapidjson provides CMake integration:
find_package(RapidJSON CONFIG REQUIRED)
target_include_directories(main PRIVATE ${RAPIDJSON_INCLUDE_DIRS})
-DCMAKE_TOOLCHAIN_FILE=../Projects/vcpkg/scripts/buildsystems/vcpkg.cmakesulfred@sulfred-PC:~/Documents/SoftwareDev/github/SulfredLee/DailyProblem/cpp/app/ProjectCreater/bin/TradingPlatform/Debug$ cat readme.txt | grep cmake cmake -G Ninja ../Projects -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../Install -DCMAKE_TOOLCHAIN_FILE=../Projects/vcpkg/scripts/buildsystems/vcpkg.cmake sulfred@sulfred-PC:~/Documents/SoftwareDev/github/SulfredLee/DailyProblem/cpp/app/ProjectCreater/bin/TradingPlatform/Debug$ cd .. sulfred@sulfred-PC:~/Documents/SoftwareDev/github/SulfredLee/DailyProblem/cpp/app/ProjectCreater/bin/TradingPlatform$ ll total 24 drwxrwxr-x 6 sulfred sulfred 4096 Mar 27 20:05 ./ drwxrwxr-x 3 sulfred sulfred 4096 Mar 27 20:10 ../ drwxrwxr-x 4 sulfred sulfred 4096 Mar 27 20:29 Debug/ drwxrwxr-x 3 sulfred sulfred 4096 Mar 27 20:30 Install/ drwxrwxr-x 4 sulfred sulfred 4096 Mar 27 20:30 Projects/ drwxrwxr-x 2 sulfred sulfred 4096 Mar 27 20:05 Release/ sulfred@sulfred-PC:~/Documents/SoftwareDev/github/SulfredLee/DailyProblem/cpp/app/ProjectCreater/bin/TradingPlatform$ ll Projects/ total 24 drwxrwxr-x 4 sulfred sulfred 4096 Mar 27 20:30 ./ drwxrwxr-x 6 sulfred sulfred 4096 Mar 27 20:05 ../ -rw-rw-r-- 1 sulfred sulfred 1025 Mar 27 20:28 CMakeLists.txt drwxrwxr-x 5 sulfred sulfred 4096 Mar 27 20:30 TradingPlatform/ -rw-rw-r-- 1 sulfred sulfred 560 Mar 27 20:05 TradingPlatform.cmake drwxrwxr-x 14 sulfred sulfred 4096 Mar 27 20:12 vcpkg/
[diff] tool = winmerge prompt = false [difftool "winmerge"] path = C:/Program Files/WinMerge/winmergeu.exe cmd = \"C:/Program Files/WinMerge/winmergeu.exe\" /e /u /wl /dl "$LOCAL" /dr "$REMOTE" "$LOCAL" "$REMOTE" [merge] tool = winmerge prompt = false [mergetool "winmerge"] path = C:/Program Files/WinMerge/winmergeu.exe cmd = \"C:/Program Files/WinMerge/winmergeu.exe\" /e /u /wl /dl "$LOCAL" /dr "$REMOTE" "$LOCAL" "$REMOTE" -o "$MERGED" trustExitCode = true keepBackup = false
[diff] tool = meld prompt = false [difftool "meld"] path = C:/Program Files (x86)/Meld/Meld.exe cmd = \"C:/Program Files (x86)/Meld/Meld.exe\" "$LOCAL" "$MERGED" "$REMOTE" --output "$MERGED" [merge] tool = meld prompt = false [mergetool "meld"] path = C:/Program Files (x86)/Meld/Meld.exe cmd = \"C:/Program Files (x86)/Meld/Meld.exe\" "$LOCAL" "$MERGED" "$REMOTE" --output "$MERGED" trustExitCode = true keepBackup = false [user] email = sflee1112@gmail.com name = SulfredLee
Here are some examples showing how to use cmake find packet.
You can install the library first.
$ sudo apt-get install libasound2
You can put the following code into CMakeLists.txt.
# Handle ALSA / ASound libraries find_package(ALSA) if (ALSA_FOUND) message (STATUS "Info - Found ALSA library: ${ALSA_LIBRARY}") message (STATUS "Info - Found ALSA include: ${ALSA_INCLUDE_DIR}") else (ALSA_FOUND) message (FATAL_ERROR "Info - ALSA is not found") endif (ALSA_FOUND)
How can I know which variables I can use?
$ sudo apt-get install xrdp
When running c++ application, we would like to get the core dump when the application is crashed. How to get those files under linux?
Add to ~/.bashrc
ulimit -c unlimited
Add to /etc/sysctl.conf
kernel.core_pattern = core.%e.%p.%t
Run command:
$ sudo sysctl --system
You can use the default setting first:
If the guest OS cannot connect to internet, you may try the host nic and bridge it:
This acceleration can be use only locally. You have to disable the spice server first.
Then you can start your VM through graphical console
Add one more Video QXL
Start VM without using virt-manager graphical console
Finally, you need to use remote-viewer and open up the guest firewall:
You may try directly remote-view the instance first, if not work, you may add the firewall steps
$ sudo apt-get install firewalld $ sudo firewall-cmd --permanent --add-service=vdsm $ sudo firewall-cmd --reload $ remote-viewer spice://localhost:5907