2022-07-30 C++ Example Project Tags: clang-tidy iwyu c++Example C++ project combining OpenCV + ImGui + SDL, works in Windows/Linux. Code formatting / analysis tools used ([Google style](https://google.github.io/styleguide/cppguide.html)): - clang-format - clang-tidy - include-what-you-use Works best in VS Code ([setup guide](https://gist.github.com/krupkat/72a675bfb16244fe887ac77eb2b0fdfa) for Windows), other editors / terminal will work as well. ## Build Clone this gist: ``` git clone https://gist.github.com/krupkat/d941d26c7dca98e9065eb99378bf5e75 ``` Move settings to expected location: ``` mkdir .vscode mv .vscode_settings.json .vscode/settings.json ``` Clone imgui + select release: ``` git clone git@github.com:ocornut/imgui.git git checkout v1.88 ``` In VS Code right click CMakeLists.txt -> Configure. Select a build variant + Kit (bottom panel), build (F7). ## Code ALT + Shift + F (Format with clang-format) CTRL + Shift + P / right click -> Run Code Analysis on Active File (run clang-tidy) include-what-you-use should run at every build (enabled with .vscode/settings.json)