i followed mostly this guide
- install cmake (latest)
- install visual studio 2022 community
- download vtk (latest), extract in src (like)
- c:\vtk\src
- c:\vtk\build (create empty dir)
- run cmake gui from start, give 2 above dirs
- run configure / generate
- run open solution (project) in visual studio
- set to Release and ALL_BUILD. build project
- open cmake gui again, same settings
- config / generate again ( make sure, vtk install path is good)
- open solution(project)
- make INSTALL project(solution default)
- make sure, run as admin, so it can install
- don't forget to add vtk\bin dir to path.
- even after path, i got error
- so i have added that path in my project configuration (debugging)
- Deebugging >> Environment >> PATH=$(PATH);C:\Program Files (x86)\VTK\bin
based on guide from here
0- copy imgui source to vendor subdir, in a new c++ windows empty project (template) 1- decide/pick between ( dx9,10,12,opengl etc) i.e i picked dx9 2- put imgui src in a subdir under 'vendor' and in project settings, add that path in vc++ directories >> likee >> $(ProjectDir)vendor\ImGui 3- connect directx 9 static lib (project linker settings ) 4- then in project, show all files, and select related .h and .cpp files, RMB and add to project. 5- write my cpp code in main file and run and it worked...
- Get MSYS2 from here
- install it, run it via msys2.exe
- it opens it bash shell, run cmd
- pacman -S --needed base-devel mingw-w64-ucrt-x86_64-toolchain
- add this to user env
- C:\msys64\ucrt64\bin
- run cpp file from code (run without debug)
- pick g++ (g++.exe) as compiler
- pick mingw64 as platform
- pick g++ (g++.exe) as linker
- run it
- pick g++ (g++.exe) as compiler
- notice tasks.json being added
- edit tasks.json like
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++.exe build active file",
"command": "C:\\msys64\\ucrt64\\bin\\g++.exe",
"args": [
"-fdiagnostics-color=always",
"-std=c++23",
"-g",
"${fileDirname}\\imgui\\*.h",
"${fileDirname}\\imgui\\*.cpp",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe",
"-ld3d9",
"-ldwmapi",
"-lgdi32",
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}