I’m trying to play around with creating a plugin. I have gone through the tutorial (which worked as advertised), and now I’m trying a small modification of that. However, after all is done (compiling, and running make install), the new plugin has been moved to the correct directory, but does not appear in the module list.
I assume that the plugin.json file is what is used to read in the information for the plugin; it is basically the same as the tutorial one, but with different names.
#include "plugin.hpp"
#include <stdint.h>
Plugin* pluginInstance;
void init(Plugin* p) {
pluginInstance = p;
// Add modules here
p->addModel(modelLofi);
// Any other plugin initialization may go here.
// As an alternative, consider lazy-loading assets and lookup tables when your module is created to reduce startup times of Rack.
}
and plugin.hpp:
#pragma once
#include <rack.hpp>
using namespace rack;
// Declare the Plugin, defined in plugin.cpp
extern Plugin* pluginInstance;
// Declare each Model, defined in each module source file
extern Model* modelLofi;
(As I mentioned, they are basically just the ones directly from the tutorial)
Ah, the log is useful. I did not look there. The relevant line was:
[0.106 warn src/plugin.cpp:158] Could not load plugin /Users/simonrose/Documents/Rack/plugins-v1/LofiAudio: Manifest contains module LofiAudio but it is not defined in the plugin