Building Rack plugins with Qt Creator in Windows 10

Just in case this is interesting for someone else or I forget it, here is how I configured my system:

  1. Install msys64 https://www.msys2.org/
  2. If you experience the ‘invalid crypto engine’ problem, have a look here: MSYS2 + win7: 'invalid crypto engine'
  3. Make msys64 install the necessary packages as described in https://vcvrack.com/manual/Building#setting-up-your-development-environment
  4. Assuming that your msys64 installation is in C:\msys64, add the two entries C:\msys64\usr\bin and C:\msys64\mingw64\bin to the path system variable. In can be found here: https://superuser.com/questions/949560/how-do-i-set-system-environment-variables-in-windows-10
  5. Install Qt Creator (https://www.qt.io/download)
  6. Import a plugin as a new Qt project, using File->New File or Project…->Import Project->Import existing Project
  7. To the created *.includes file, add …/…/include (VCV Rack includes) and C:\msys64\mingw64\include\c++\9.2.0 (C++ standard stuff)
  8. Deactivate ClangCodeModel in Help->Plugins…->C++ to get rid of useless warnings
  9. Make sure you use the mingw build kit, see https://doc.qt.io/qtcreator/creator-tool-chains.html

For future reference, here is my kit configuration:

2 Likes

I would add here that you do not need to disable Clang code model. Instead you can do the following to instruct it into not generating useless warnings:

  • Inside your .cxxflags file add “-std=c++11”
  • Inside your cflags file add “-std=c11”
  • Inside your .config file add “#define _USE_MATH_DEFINES”

Personally I compile from the msys64 shell, therefore I haven’t yet enabled full compile/debug integration. When I integrate everything, this post will be updated.

1 Like