Bloody Noob Corner?

Hi Rackheadz,

is there a corner for realy bloody basic questions for VCV Module programming?

I got pinched by another thread, installed the Dev-Environment but get stuct even before I can write some code.

I followed the instructions on https://vcvrack.com/manual/PluginDevelopmentTutorial.html and https://vcvrack.com/manual/Building.html#setting-up-your-development-environment

but get my first error on make.

src/plugin.cpp:4:1: error: expected initializer before 'Plugin'
    4 | Plugin* pluginInstance;
      | ^~~~~~
src/plugin.cpp: In function 'void init(rack::plugin::Plugin*)':
src/plugin.cpp:12:14: error: 'modelMidiKlokR' was not declared in this scope
   12 |  p->addModel(modelMidiKlokR);

after helper.py createmodule … I did add to plugin.hpp

extern Model* modelMidiKlokR

and in plugin.cpp looks like

#include "plugin.hpp"
Plugin* pluginInstance;
void init(Plugin* p) {
	pluginInstance = p;
	// Add modules here
	// p->addModel(modelMyModule);
	p->addModel(modelMidiKlokR);
	// 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.
}

Can anybody give me some hints??

This may just be a forum copy-paste slip-up, but are you missing a semicolon on the end of this line?:

1 Like

@Richie … :see_no_evil::see_no_evil: THANKS a lot … YES I did miss to add it … :face_with_symbols_over_mouth: my last scripting is about 10 years ago (python/php/…) still need some warmup

Happy to help! We were all Bloody Noobs once. :slight_smile:

The lesson here is that C++ error reporting is not great. The compiler will report an error against the first piece of code that it doesn’t understand, but you need to be aware that the actual problem might be further up the source file, and if you’re really unlucky, in a completely different file.

4 Likes

Another little problem,

I now created a testing Module, which is basically a copy of VCV’s Midi-CV from just the Midi System Message part to enhance Midiclocking.

=> make runs without errors => make dist works perfectly too

If I put the .zip file into my Rack’s plugin-v1 folder it gets unpacked and is visible incl. all files,

but when I open Rack, the module does not show in my library

I used the Rack-SDK and msys64 with the mingw64-Shell on Windows 10 to build this test-module. And helper.py to create the Module.

Have you updated plugin.json to include your new module?

1 Like

Yes, plugin.json has been updated and checked for Typos.

The Brandname/slug are also not visible in my library

found the Error: version in plugin.json has to start with 1, … I had a version: “0.0.4” because I saw it as only some testingstuff.

3 Likes