"File not found" error when building template plugin

Problem in short:

I’ve been going through the “Plugin Development Tutorial” and repeatedly come to the same roadblock. I make the example plugin with “helper.py” without a problem, but when I run “make” or “make install”, it comes up with same error that it can’t find “<rack.hpp>”.

I’m running on Windows 10 with Rack 1.1.6 and Rack-SDK 1.1.6


Here are all the steps I took, just in case someone can spot any mistakes I’m making.

  • I downloaded the SDK and put it in a folder on my desktop.

  • I downloaded MSYS2, started the 64-bit shell and ran
    pacman -Syu

  • I then restarted the shell and downloaded the rest of the packages with
    pacman -Su

  • I defined “RACK_DIR” in my .bashrc file
    RACK_DIR=C:/Users/josh/Desktop/Rack-SDK

  • I then made a second folder on the desktop called “Custom_Plugins”. I navigated bash to this new folder and ran
    $RACK_DIR/helper.py createplugin MyPlugin
    The script runs fine and it makes a new plugin folder.

  • I then navigate bash to the new “MyPlugin” folder and run
    make
    But every time it comes up with this message:
g++ -std=c++11 -Wsuggest-override -fPIC -IC:/Users/josh/Desktop/Rack-SDK/include -IC:/Users/josh/Desktop/Rack-SDK/dep/include -MMD -MP -g -O3-march=nocona -funsafe-math-optimizations -Wall -Wextra -Wno-unused-parameter -DARCH_WIN -D_USE_MATH_DEFINES -c -o build/src/plugin.cpp.o src/plugin.cpp
In file included from src/plugin.cpp:1
src/plugin.hpp:2:10 fatal error: rack.hpp: No such file or directory
    2 | #include <rack.hpp>
      |          ^~~~~~~~~~
compilation terminated.
make: *** [C:Users/josh/Desktop/Rack_SDK/compile.mk:69: build/src/plugin.cpp.0] Error 1

I kept thinking that my RACK_DIR path was wrong and that's why it couldn't find the rack header files, but RACK_DIR worked perfectly with the helper.py script. I've even moved the folders to different locations and update RACK_DIR to reflect the changes, but to no avail. I just don't understand how it can't find the header files.

If anyone can tell me if I missed something, I’d really appreciate it.

Your path seems wrong: on Linux it will probably be something akin to /home/username/Rack-SDK. You can open a terminal from the Rack-SDK folder (right click) and type pwd then enter to have the right path.

I have been under the impression that it didn’t matter where the SDK folder is on the computer. I thought you could have it and your plugin folder anywhere. Is that not the case? Does it have to be somewhere specific for it work?

That was it! Thank you! Since I’m on Windows, not Linux, I had to move the SDK into the C:/msys64/home/username directory. Ran make again and worked like a charm. :grinning:

1 Like

Glad you found the issue!