Porting to v1 help wrt addInput()

Hey, I’m upgrading my plugin from v0.6 to v1. I followed https://vcvrack.com/manual/Migrate1.html until step 1.8.

When I compile I get a bunch of errors similar to the one below. The code can be seen in full here:

Can anyone tell me how to fix? Thanks

src/SeqModule.cpp: In member function ‘void SEQModule::InitUI(rack::app::ModuleWidget*, rack::math::Rect)’:
src/SeqModule.cpp:81:92: error: no matching function for call to ‘SEQModule::addInput(rack::componentlibrary::PJ301MPort*)’
addInput(createInput(Vec(portX[0] - 1, 98), module, SEQModule::CLOCK_INPUT));
In file included from src/SeqModule.cpp:1:
src/SeqModule.h:120:11: note: candidate: ‘rack::engine::Port* SEQModule::addInput(rack::engine::Port*)’
Port *addInput(Port *input);
src/SeqModule.h:120:11: note: no known conversion for argument 1 from ‘rack::componentlibrary::PJ301MPort*’ to ‘rack::engine::Port*’

addInput(createInput<PJ301MPort> ...

you miss the template argument

BTW, check include/helpers.hpp if you want to see how that works under the hood–it’s clarifying (at least it was for me! :slight_smile: )