This is a small demo for processing Qt+Cuda code in Window platform using VSCode~
- Create a Qt project in VSCode, choose qmake;
- Add the include path and the bin path in .pro and launch.json, respectively;
- Open a cmd widow, and build the xxx.cu file to generate a xxx.obj file;
the command is "nvcc -Xcompiler "/MDd" -D_DEBUG -c bilinear.cu"; - Add the following line to the .pro file; "OBJECTS += $$PWD/build/debug/xxx.obj";
- Run your code.
It is highly recommended to use the system PATH for the cuda environment.
And if you have other .dll files for the project, you can give the PATH as "${env:PATH};D:\Env\GLight\bin" in the launch.json.