gratrix / vcv-gratrix

Gratrix modules for VCV Rack
http://gratrix.net/vcvrack
MIT License
30 stars 6 forks source link

make error #1

Closed Malifick closed 7 years ago

Malifick commented 7 years ago

src/Gratrix.cpp:25:5: error: ‘struct rack::Plugin’ has no member named ‘addModel’ p->addModel(createModel ("Gratrix", "Gratrix", "Blank9", "Blank 9")); ^~~~ src/Gratrix.cpp:25:84: error: no matching function for call to ‘createModel(const char [8], const char [8], const char [7], const char [8])’ Model(createModel ("Gratrix", "Gratrix", "Blank9", "Blank 9")); ^ In file included from src/Gratrix.hpp:3:0, from src/Gratrix.cpp:1: ../../include/rack.hpp:21:8: note: candidate: template rack::Model rack::createModel(rack::Plugin, std::cxx11::string, std::cxx11::string) Model createModel(Plugin plugin, std::string slug, std::string name) { ^~~ ../../include/rack.hpp:21:8: note: template argument deduction/substitution failed: src/Gratrix.cpp:25:84: note: candidate expects 3 arguments, 4 provided Model(createModel ("Gratrix", "Gratrix", "Blank9", "Blank 9")); ^ src/Gratrix.cpp:26:5: error: ‘struct rack::Plugin’ has no member named ‘addModel’ p->addModel(createModel ("Gratrix", "Gratrix", "Blank12", "Blank 12")); ^~~~ src/Gratrix.cpp:26:85: error: no matching function for call to ‘createModel(const char [8], const char [8], const char [8], const char [9])’ odel(createModel ("Gratrix", "Gratrix", "Blank12", "Blank 12")); ^ In file included from src/Gratrix.hpp:3:0, from src/Gratrix.cpp:1: ../../include/rack.hpp:21:8: note: candidate: template rack::Model rack::createModel(rack::Plugin, std::cxx11::string, std::cxx11::string) Model createModel(Plugin plugin, std::string slug, std::string name) { ^~~ ../../include/rack.hpp:21:8: note: template argument deduction/substitution failed: src/Gratrix.cpp:26:85: note: candidate expects 3 arguments, 4 provided odel(createModel ("Gratrix", "Gratrix", "Blank12", "Blank 12")); ^ make: *** [../../compile.mk:55: build/src/Gratrix.cpp.o] Error 1

lnikj commented 7 years ago

I think from the note on the front page that it is built against a previous dev commit. I can't build it (on Mac) either.

Malifick commented 7 years ago

ya I'm building it on linux

lnikj commented 7 years ago

On closer examination my errors are different to yours. I'm not a dev but a quick google leads me to suspect that this a problem with cmake on my Mac and that it would compile with gcc.

MBP:vcv-gratrix nik$ make c++ -fPIC -I../../include -I../../dep/include -MMD -g -O3 -march=nocona -ffast-math -fno-finite-math-only -Wall -Wextra -Wno-unused-parameter -DARCH_MAC -mmacosx-version-min=10.7 -std=c++11 -stdlib=libc++ -c -o build/src/ADSR.cpp.o src/ADSR.cpp In file included from src/ADSR.cpp:1: src/Gratrix.hpp:32:18: error: constexpr function never produces a constant expression [-Winvalid-constexpr] constexpr double dx(double i, std::size_t n) { return std::sin(GTX2PI * static_cast<doub... ^ src/Gratrix.hpp:32:56: note: non-constexpr function 'sin' cannot be used in a constant expression constexpr double dx(double i, std::size_t n) { return std::sin(GTX2PI static_cast<doub... ^ /usr/include/math.h:343:15: note: declared here extern double sin(double); ^ In file included from src/ADSR.cpp:1: src/Gratrix.hpp:33:18: error: constexpr function never produces a constant expression [-Winvalid-constexpr] constexpr double dy(double i, std::size_t n) { return -std::cos(GTX__2PI static_cast<doub... ^ src/Gratrix.hpp:33:56: note: non-constexpr function 'cos' cannot be used in a constant expression constexpr double dy(double i, std::size_t n) { return -std::cos(GTX__2PI static_cast<doub... ^ /usr/include/math.h:339:15: note: declared here extern double cos(double); ^ In file included from src/ADSR.cpp:1: src/Gratrix.hpp:37:18: error: constexpr function never produces a constant expression [-Winvalid-constexpr] constexpr int gx(double i) { return static_cast(std::floor(0.5 + ((i+0.5) 90))); } ^ src/Gratrix.hpp:37:57: note: non-constexpr function 'floor' cannot be used in a constant expression constexpr int gx(double i) { return static_cast(std::floor(0.5 + ((i+0.5) 90))); } ^ /usr/include/math.h:474:15: note: declared here extern double floor(double); ^ In file included from src/ADSR.cpp:1: src/Gratrix.hpp:38:18: error: constexpr function never produces a constant expression [-Winvalid-constexpr] constexpr int gy(double i) { return static_cast(std::floor(8.5 + ((i+1.0) 102))); } ^ src/Gratrix.hpp:38:57: note: non-constexpr function 'floor' cannot be used in a constant expression constexpr int gy(double i) { return static_cast(std::floor(8.5 + ((i+1.0) 102))); } ^ /usr/include/math.h:474:15: note: declared here extern double floor(double); ^ src/ADSR.cpp:103:27: error: implicit instantiation of undefined template 'std::1::array<ADSR, 6>' std::array<ADSR, GTXN> inst; ^ /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__tuple:116:65: note: template is declared here template <class _Tp, size_t _Size> struct _LIBCPP_TYPE_VIS_ONLY array; ^ src/ADSR.cpp:143:12: error: cannot initialize a parameter of type 'rack::Module ' with an lvalue of type 'ADSRBank ' setModule(module); ^~ ../../include/app.hpp:37:25: note: passing argument to parameter 'module' here void setModule(Module module); ^ src/ADSR.cpp:173:11: error: no matching function for call to 'createParam' addParam(createParam(n_m(fx(0+0.18), fy(-0.28)), module, ADSR::ATTA... ^~~~~~~ ../../include/rack.hpp:38:14: note: candidate function [with TParam = rack::RoundBlackKnob] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument ParamWidget createParam(Vec pos, Module module, int paramId, float minValue, float maxVal... ^ src/ADSR.cpp:174:11: error: no matching function for call to 'createParam' addParam(createParam(n_m(fx(1+0.18), fy(-0.28)), module, ADSR::DECA... ^~~~~~~ ../../include/rack.hpp:38:14: note: candidate function [with TParam = rack::RoundBlackKnob] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument ParamWidget createParam(Vec pos, Module module, int paramId, float minValue, float maxVal... ^ src/ADSR.cpp:175:11: error: no matching function for call to 'createParam' addParam(createParam(n_m(fx(0+0.18), fy(+0.28)), module, ADSR::SUST... ^~~~~~~ ../../include/rack.hpp:38:14: note: candidate function [with TParam = rack::RoundBlackKnob] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument ParamWidget createParam(Vec pos, Module module, int paramId, float minValue, float maxVal... ^ src/ADSR.cpp:176:11: error: no matching function for call to 'createParam' addParam(createParam(n_m(fx(1+0.18), fy(+0.28)), module, ADSR::RELE... ^~~~~~~ ../../include/rack.hpp:38:14: note: candidate function [with TParam = rack::RoundBlackKnob] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument ParamWidget createParam(Vec pos, Module module, int paramId, float minValue, float maxVal... ^ src/ADSR.cpp:178:11: error: no matching function for call to 'createInput' addInput(createInput(prt(fx(0-0.28), fy(-0.28)), module, ADSR::ATTACK_INPUT)); ^~~~~~~ ../../include/rack.hpp:49:7: note: candidate function [with TPort = rack::PJ301MPort] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument Port createInput(Vec pos, Module module, int inputId) { ^ src/ADSR.cpp:179:11: error: no matching function for call to 'createInput' addInput(createInput(prt(fx(1-0.28), fy(-0.28)), module, ADSR::DECAY_INPUT)); ^~~~~~~ ../../include/rack.hpp:49:7: note: candidate function [with TPort = rack::PJ301MPort] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument Port createInput(Vec pos, Module module, int inputId) { ^ src/ADSR.cpp:180:11: error: no matching function for call to 'createInput' addInput(createInput(prt(fx(0-0.28), fy(+0.28)), module, ADSR::SUSTAIN_INPUT)); ^~~~~~~ ../../include/rack.hpp:49:7: note: candidate function [with TPort = rack::PJ301MPort] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument Port createInput(Vec pos, Module module, int inputId) { ^ src/ADSR.cpp:181:11: error: no matching function for call to 'createInput' addInput(createInput(prt(fx(1-0.28), fy(+0.28)), module, ADSR::RELEASE_INPUT)); ^~~~~~~ ../../include/rack.hpp:49:7: note: candidate function [with TPort = rack::PJ301MPort] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument Port createInput(Vec pos, Module module, int inputId) { ^ src/ADSR.cpp:185:12: error: no matching function for call to 'createInput' addInput(createInput (prt(px(0, i), py(1, i)), module, ADSRBank... ^~~~~~~ ../../include/rack.hpp:49:7: note: candidate function [with TPort = rack::PJ301MPort] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument Port createInput(Vec pos, Module module, int inputId) { ^ src/ADSR.cpp:186:12: error: no matching function for call to 'createInput' addInput(createInput (prt(px(0, i), py(2, i)), module, ADSRBank... ^~~~~~~ ../../include/rack.hpp:49:7: note: candidate function [with TPort = rack::PJ301MPort] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument Port createInput(Vec pos, Module module, int inputId) { ^ src/ADSR.cpp:188:13: error: no matching function for call to 'createOutput' addOutput(createOutput(prt(px(1, i), py(1, i)), module, ADSRBan... ^~~~~~~~ ../../include/rack.hpp:59:7: note: candidate function [with TPort = rack::PJ301MPort] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument Port createOutput(Vec pos, Module module, int outputId) { ^ src/ADSR.cpp:189:13: error: no matching function for call to 'createOutput' addOutput(createOutput(prt(px(1, i), py(2, i)), module, ADSRBan... ^~~~~~~~ ../../include/rack.hpp:59:7: note: candidate function [with TPort = rack::PJ301MPort] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument Port createOutput(Vec pos, Module module, int outputId) { ^ src/ADSR.cpp:192:11: error: no matching function for call to 'createInput' addInput(createInput (prt(gx(0), gy(1)), module, ADSRBank::imap(ADSR::G... ^~~~~~~ ../../include/rack.hpp:49:7: note: candidate function [with TPort = rack::PJ301MPort] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument Port createInput(Vec pos, Module module, int inputId) { ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make: *** [build/src/ADSR.cpp.o] Error 1

Malifick commented 7 years ago

Yeah I am doing it with gcc

lorez22 commented 7 years ago

I can't compile on windows

g++ -fPIC -I../../include -I../../dep/include -DVERSION=dev -DVERSION_dev -MMD -O3 -march=nocona -ffast-math -Wall -g -DARCH_WIN -D_USE_MATH_DEFINES -std=c++11 -c -o build/src/Gratrix.cpp.o src/Gratrix.cpp src/Gratrix.cpp: In function 'void init(rack::Plugin)': src/Gratrix.cpp:10:5: error: 'struct rack::Plugin' has no member named 'version' p->version = TOSTRING(VERSION); ^~~ src/Gratrix.cpp:12:5: error: 'struct rack::Plugin' has no member named 'addModel' p->addModel(createModel ("Gratrix", "Gratrix", "VCO-F1", "VCO-F1")); ^~~~ src/Gratrix.cpp:12:83: error: no matching function for call to 'createModel(const char [8], const char [8], const char [7], const char [7])' p->addModel(createModel ("Gratrix", "Gratrix", "VCO-F1", "VCO-F1")); ^ In file included from src/Gratrix.hpp:3:0, from src/Gratrix.cpp:1: ../../include/rack.hpp:21:8: note: candidate: template rack::Model rack::createModel(rack::Plugin, std::cxx11::string, std::cxx11::string) Model createModel(Plugin plugin, std::string slug, std::string name) { ^~~ ../../include/rack.hpp:21:8: note: template argument deduction/substitution failed: src/Gratrix.cpp:12:83: note: candidate expects 3 arguments, 4 provided p->addModel(createModel ("Gratrix", "Gratrix", "VCO-F1", "VCO-F1")); ^ src/Gratrix.cpp:13:5: error: 'struct rack::Plugin' has no member named 'addModel' p->addModel(createModel ("Gratrix", "Gratrix", "VCO-F2", "VCO-F2")); ^~~~ src/Gratrix.cpp:13:83: error: no matching function for call to 'createModel(const char [8], const char [8], const char [7], const char [7])' p->addModel(createModel ("Gratrix", "Gratrix", "VCO-F2", "VCO-F2")); ^ In file included from src/Gratrix.hpp:3:0, from src/Gratrix.cpp:1: ../../include/rack.hpp:21:8: note: candidate: template rack::Model rack::createModel(rack::Plugin, std::cxx11::string, std::cxx11::string) Model createModel(Plugin plugin, std::string slug, std::string name) { ^~~ ../../include/rack.hpp:21:8: note: template argument deduction/substitution failed: src/Gratrix.cpp:13:83: note: candidate expects 3 arguments, 4 provided p->addModel(createModel ("Gratrix", "Gratrix", "VCO-F2", "VCO-F2")); ^ src/Gratrix.cpp:14:5: error: 'struct rack::Plugin' has no member named 'addModel' p->addModel(createModel ("Gratrix", "Gratrix", "VCF-F1", "VCF-F1")); ^~~~ src/Gratrix.cpp:14:83: error: no matching function for call to 'createModel(const char [8], const char [8], const char [7], const char [7])' p->addModel(createModel ("Gratrix", "Gratrix", "VCF-F1", "VCF-F1")); ^ In file included from src/Gratrix.hpp:3:0, from src/Gratrix.cpp:1: ../../include/rack.hpp:21:8: note: candidate: template rack::Model rack::createModel(rack::Plugin, std::cxx11::string, std::cxx11::string) Model createModel(Plugin plugin, std::string slug, std::string name) { ^~~ ../../include/rack.hpp:21:8: note: template argument deduction/substitution failed: src/Gratrix.cpp:14:83: note: candidate expects 3 arguments, 4 provided p->addModel(createModel ("Gratrix", "Gratrix", "VCF-F1", "VCF-F1")); ^ src/Gratrix.cpp:15:5: error: 'struct rack::Plugin' has no member named 'addModel' p->addModel(createModel ("Gratrix", "Gratrix", "VCA-F1", "VCA-F1")); ^~~~ src/Gratrix.cpp:15:83: error: no matching function for call to 'createModel(const char [8], const char [8], const char [7], const char [7])' p->addModel(createModel ("Gratrix", "Gratrix", "VCA-F1", "VCA-F1")); ^ In file included from src/Gratrix.hpp:3:0, from src/Gratrix.cpp:1: ../../include/rack.hpp:21:8: note: candidate: template rack::Model rack::createModel(rack::Plugin, std::cxx11::string, std::cxx11::string) Model createModel(Plugin plugin, std::string slug, std::string name) { ^~~ ../../include/rack.hpp:21:8: note: template argument deduction/substitution failed: src/Gratrix.cpp:15:83: note: candidate expects 3 arguments, 4 provided p->addModel(createModel ("Gratrix", "Gratrix", "VCA-F1", "VCA-F1")); ^ src/Gratrix.cpp:16:5: error: 'struct rack::Plugin' has no member named 'addModel' p->addModel(createModel ("Gratrix", "Gratrix", "Env-F1", "Env-F1")); ^~~~ src/Gratrix.cpp:16:83: error: no matching function for call to 'createModel(const char [8], const char [8], const char [7], const char [7])' p->addModel(createModel ("Gratrix", "Gratrix", "Env-F1", "Env-F1")); ^ In file included from src/Gratrix.hpp:3:0, from src/Gratrix.cpp:1: ../../include/rack.hpp:21:8: note: candidate: template rack::Model rack::createModel(rack::Plugin, std::cxx11::string, std::cxx11::string) Model createModel(Plugin plugin, std::string slug, std::string name) { ^~~ ../../include/rack.hpp:21:8: note: template argument deduction/substitution failed: src/Gratrix.cpp:16:83: note: candidate expects 3 arguments, 4 provided p->addModel(createModel ("Gratrix", "Gratrix", "Env-F1", "Env-F1")); ^ src/Gratrix.cpp:17:5: error: 'struct rack::Plugin' has no member named 'addModel' p->addModel(createModel ("Gratrix", "Gratrix", "Chord12", "Chord 12")); ^~~~ src/Gratrix.cpp:17:85: error: no matching function for call to 'createModel(const char [8], const char [8], const char [8], const char [9])' p->addModel(createModel ("Gratrix", "Gratrix", "Chord12", "Chord 12")); ^ In file included from src/Gratrix.hpp:3:0, from src/Gratrix.cpp:1: ../../include/rack.hpp:21:8: note: candidate: template rack::Model rack::createModel(rack::Plugin, std::cxx11::string, std::cxx11::string) Model createModel(Plugin plugin, std::string slug, std::string name) { ^~~ ../../include/rack.hpp:21:8: note: template argument deduction/substitution failed: src/Gratrix.cpp:17:85: note: candidate expects 3 arguments, 4 provided p->addModel(createModel ("Gratrix", "Gratrix", "Chord12", "Chord 12")); ^ src/Gratrix.cpp:18:5: error: 'struct rack::Plugin' has no member named 'addModel' p->addModel(createModel("Gratrix", "Gratrix", "Fade-G1", "Fade-G1")); ^~~~ src/Gratrix.cpp:18:84: error: no matching function for call to 'createModel(const char [8], const char [8], const char [8], const char [8])' p->addModel(createModel("Gratrix", "Gratrix", "Fade-G1", "Fade-G1")); ^ In file included from src/Gratrix.hpp:3:0, from src/Gratrix.cpp:1: ../../include/rack.hpp:21:8: note: candidate: template rack::Model rack::createModel(rack::Plugin, std::cxx11::string, std::cxx11::string) Model createModel(Plugin plugin, std::string slug, std::string name) { ^~~ ../../include/rack.hpp:21:8: note: template argument deduction/substitution failed: src/Gratrix.cpp:18:84: note: candidate expects 3 arguments, 4 provided p->addModel(createModel("Gratrix", "Gratrix", "Fade-G1", "Fade-G1")); ^ src/Gratrix.cpp:19:5: error: 'struct rack::Plugin' has no member named 'addModel' p->addModel(createModel("Gratrix", "Gratrix", "Fade-G2", "Fade-G2")); ^~~~ src/Gratrix.cpp:19:84: error: no matching function for call to 'createModel(const char [8], const char [8], const char [8], const char [8])' p->addModel(createModel("Gratrix", "Gratrix", "Fade-G2", "Fade-G2")); ^ In file included from src/Gratrix.hpp:3:0, from src/Gratrix.cpp:1: ../../include/rack.hpp:21:8: note: candidate: template rack::Model rack::createModel(rack::Plugin, std::cxx11::string, std::cxx11::string) Model createModel(Plugin plugin, std::string slug, std::string name) { ^~~ ../../include/rack.hpp:21:8: note: template argument deduction/substitution failed: src/Gratrix.cpp:19:84: note: candidate expects 3 arguments, 4 provided p->addModel(createModel("Gratrix", "Gratrix", "Fade-G2", "Fade-G2")); ^ src/Gratrix.cpp:22:5: error: 'struct rack::Plugin' has no member named 'addModel' p->addModel(createModel ("Gratrix", "Gratrix", "Octave", "Octave")); ^~~~ src/Gratrix.cpp:22:83: error: no matching function for call to 'createModel(const char [8], const char [8], const char [7], const char [7])' p->addModel(createModel ("Gratrix", "Gratrix", "Octave", "Octave")); ^ In file included from src/Gratrix.hpp:3:0, from src/Gratrix.cpp:1: ../../include/rack.hpp:21:8: note: candidate: template rack::Model rack::createModel(rack::Plugin, std::cxx11::string, std::cxx11::string) Model createModel(Plugin plugin, std::string slug, std::string name) { ^~~ ../../include/rack.hpp:21:8: note: template argument deduction/substitution failed: src/Gratrix.cpp:22:83: note: candidate expects 3 arguments, 4 provided p->addModel(createModel ("Gratrix", "Gratrix", "Octave", "Octave")); ^ src/Gratrix.cpp:23:5: error: 'struct rack::Plugin' has no member named 'addModel' p->addModel(createModel ("Gratrix", "Gratrix", "Blank3", "Blank 3")); ^~~~ src/Gratrix.cpp:23:84: error: no matching function for call to 'createModel(const char [8], const char [8], const char [7], const char [8])' p->addModel(createModel ("Gratrix", "Gratrix", "Blank3", "Blank 3")); ^ In file included from src/Gratrix.hpp:3:0, from src/Gratrix.cpp:1: ../../include/rack.hpp:21:8: note: candidate: template rack::Model rack::createModel(rack::Plugin, std::cxx11::string, std::cxx11::string) Model createModel(Plugin plugin, std::string slug, std::string name) { ^~~ ../../include/rack.hpp:21:8: note: template argument deduction/substitution failed: src/Gratrix.cpp:23:84: note: candidate expects 3 arguments, 4 provided p->addModel(createModel ("Gratrix", "Gratrix", "Blank3", "Blank 3")); ^ src/Gratrix.cpp:24:5: error: 'struct rack::Plugin' has no member named 'addModel' p->addModel(createModel ("Gratrix", "Gratrix", "Blank6", "Blank 6")); ^~~~ src/Gratrix.cpp:24:84: error: no matching function for call to 'createModel(const char [8], const char [8], const char [7], const char [8])' p->addModel(createModel ("Gratrix", "Gratrix", "Blank6", "Blank 6")); ^ In file included from src/Gratrix.hpp:3:0, from src/Gratrix.cpp:1: ../../include/rack.hpp:21:8: note: candidate: template rack::Model rack::createModel(rack::Plugin, std::cxx11::string, std::cxx11::string) Model createModel(Plugin plugin, std::string slug, std::string name) { ^~~ ../../include/rack.hpp:21:8: note: template argument deduction/substitution failed: src/Gratrix.cpp:24:84: note: candidate expects 3 arguments, 4 provided p->addModel(createModel ("Gratrix", "Gratrix", "Blank6", "Blank 6")); ^ src/Gratrix.cpp:25:5: error: 'struct rack::Plugin' has no member named 'addModel' p->addModel(createModel ("Gratrix", "Gratrix", "Blank9", "Blank 9")); ^~~~ src/Gratrix.cpp:25:84: error: no matching function for call to 'createModel(const char [8], const char [8], const char [7], const char [8])' p->addModel(createModel ("Gratrix", "Gratrix", "Blank9", "Blank 9")); ^ In file included from src/Gratrix.hpp:3:0, from src/Gratrix.cpp:1: ../../include/rack.hpp:21:8: note: candidate: template rack::Model rack::createModel(rack::Plugin, std::cxx11::string, std::cxx11::string) Model createModel(Plugin plugin, std::string slug, std::string name) { ^~~ ../../include/rack.hpp:21:8: note: template argument deduction/substitution failed: src/Gratrix.cpp:25:84: note: candidate expects 3 arguments, 4 provided p->addModel(createModel ("Gratrix", "Gratrix", "Blank9", "Blank 9")); ^ src/Gratrix.cpp:26:5: error: 'struct rack::Plugin' has no member named 'addModel' p->addModel(createModel ("Gratrix", "Gratrix", "Blank12", "Blank 12")); ^~~~ src/Gratrix.cpp:26:85: error: no matching function for call to 'createModel(const char [8], const char [8], const char [8], const char [9])' p->addModel(createModel ("Gratrix", "Gratrix", "Blank12", "Blank 12")); ^ In file included from src/Gratrix.hpp:3:0, from src/Gratrix.cpp:1: ../../include/rack.hpp:21:8: note: candidate: template rack::Model rack::createModel(rack::Plugin, std::cxx11::string, std::cxx11::string) Model createModel(Plugin *plugin, std::string slug, std::string name) { ^~~ ../../include/rack.hpp:21:8: note: template argument deduction/substitution failed: src/Gratrix.cpp:26:85: note: candidate expects 3 arguments, 4 provided p->addModel(createModel ("Gratrix", "Gratrix", "Blank12", "Blank 12")); ^ make: *** [../../compile.mk:51: build/src/Gratrix.cpp.o] Error 1

gratrix commented 7 years ago

Sorry about the constexpr sin/cos issue, it compiled fine on Windows. Done a bit of digging any maybe in general sin/cos are not constexpr. For now, replace constexpr with inline. I won't be able to make any commits until this evening UK time.

gratrix commented 7 years ago

lorez22 I think you need to update your version of Rack. have a look at http://www.switchedonrack.com/attention-developers-changes-in-api.html

lnikj commented 7 years ago

No worries. Using inline got rid of the first set of errors but it bombs out in ADSR.cpp still:

MBP:vcv-gratrix nik$ make c++ -fPIC -I../../include -I../../dep/include -MMD -g -O3 -march=nocona -ffast-math -fno-finite-math-only -Wall -Wextra -Wno-unused-parameter -DARCH_MAC -mmacosx-version-min=10.7 -std=c++11 -stdlib=libc++ -c -o build/src/ADSR.cpp.o src/ADSR.cpp src/ADSR.cpp:103:27: error: implicit instantiation of undefined template 'std::1::array<ADSR, 6>' std::array<ADSR, GTXN> inst; ^ /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__tuple:116:65: note: template is declared here template <class _Tp, size_t _Size> struct _LIBCPP_TYPE_VIS_ONLY array; ^ src/ADSR.cpp:143:12: error: cannot initialize a parameter of type 'rack::Module ' with an lvalue of type 'ADSRBank ' setModule(module); ^~ ../../include/app.hpp:37:25: note: passing argument to parameter 'module' here void setModule(Module module); ^ src/ADSR.cpp:173:11: error: no matching function for call to 'createParam' addParam(createParam(n_m(fx(0+0.18), fy(-0.28)), module, ADSR::ATTA... ^~~~~~~ ../../include/rack.hpp:38:14: note: candidate function [with TParam = rack::RoundBlackKnob] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument ParamWidget createParam(Vec pos, Module module, int paramId, float minValue, float maxVal... ^ src/ADSR.cpp:174:11: error: no matching function for call to 'createParam' addParam(createParam(n_m(fx(1+0.18), fy(-0.28)), module, ADSR::DECA... ^~~~~~~ ../../include/rack.hpp:38:14: note: candidate function [with TParam = rack::RoundBlackKnob] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument ParamWidget createParam(Vec pos, Module module, int paramId, float minValue, float maxVal... ^ src/ADSR.cpp:175:11: error: no matching function for call to 'createParam' addParam(createParam(n_m(fx(0+0.18), fy(+0.28)), module, ADSR::SUST... ^~~~~~~ ../../include/rack.hpp:38:14: note: candidate function [with TParam = rack::RoundBlackKnob] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument ParamWidget createParam(Vec pos, Module module, int paramId, float minValue, float maxVal... ^ src/ADSR.cpp:176:11: error: no matching function for call to 'createParam' addParam(createParam(n_m(fx(1+0.18), fy(+0.28)), module, ADSR::RELE... ^~~~~~~ ../../include/rack.hpp:38:14: note: candidate function [with TParam = rack::RoundBlackKnob] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument ParamWidget createParam(Vec pos, Module module, int paramId, float minValue, float maxVal... ^ src/ADSR.cpp:178:11: error: no matching function for call to 'createInput' addInput(createInput(prt(fx(0-0.28), fy(-0.28)), module, ADSR::ATTACK_INPUT)); ^~~~~~~ ../../include/rack.hpp:49:7: note: candidate function [with TPort = rack::PJ301MPort] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument Port createInput(Vec pos, Module module, int inputId) { ^ src/ADSR.cpp:179:11: error: no matching function for call to 'createInput' addInput(createInput(prt(fx(1-0.28), fy(-0.28)), module, ADSR::DECAY_INPUT)); ^~~~~~~ ../../include/rack.hpp:49:7: note: candidate function [with TPort = rack::PJ301MPort] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument Port createInput(Vec pos, Module module, int inputId) { ^ src/ADSR.cpp:180:11: error: no matching function for call to 'createInput' addInput(createInput(prt(fx(0-0.28), fy(+0.28)), module, ADSR::SUSTAIN_INPUT)); ^~~~~~~ ../../include/rack.hpp:49:7: note: candidate function [with TPort = rack::PJ301MPort] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument Port createInput(Vec pos, Module module, int inputId) { ^ src/ADSR.cpp:181:11: error: no matching function for call to 'createInput' addInput(createInput(prt(fx(1-0.28), fy(+0.28)), module, ADSR::RELEASE_INPUT)); ^~~~~~~ ../../include/rack.hpp:49:7: note: candidate function [with TPort = rack::PJ301MPort] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument Port createInput(Vec pos, Module module, int inputId) { ^ src/ADSR.cpp:185:12: error: no matching function for call to 'createInput' addInput(createInput (prt(px(0, i), py(1, i)), module, ADSRBank... ^~~~~~~ ../../include/rack.hpp:49:7: note: candidate function [with TPort = rack::PJ301MPort] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument Port createInput(Vec pos, Module module, int inputId) { ^ src/ADSR.cpp:186:12: error: no matching function for call to 'createInput' addInput(createInput (prt(px(0, i), py(2, i)), module, ADSRBank... ^~~~~~~ ../../include/rack.hpp:49:7: note: candidate function [with TPort = rack::PJ301MPort] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument Port createInput(Vec pos, Module module, int inputId) { ^ src/ADSR.cpp:188:13: error: no matching function for call to 'createOutput' addOutput(createOutput(prt(px(1, i), py(1, i)), module, ADSRBan... ^~~~~~~~ ../../include/rack.hpp:59:7: note: candidate function [with TPort = rack::PJ301MPort] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument Port createOutput(Vec pos, Module module, int outputId) { ^ src/ADSR.cpp:189:13: error: no matching function for call to 'createOutput' addOutput(createOutput(prt(px(1, i), py(2, i)), module, ADSRBan... ^~~~~~~~ ../../include/rack.hpp:59:7: note: candidate function [with TPort = rack::PJ301MPort] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument Port createOutput(Vec pos, Module module, int outputId) { ^ src/ADSR.cpp:192:11: error: no matching function for call to 'createInput' addInput(createInput (prt(gx(0), gy(1)), module, ADSRBank::imap(ADSR::G... ^~~~~~~ ../../include/rack.hpp:49:7: note: candidate function [with TPort = rack::PJ301MPort] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument Port createInput(Vec pos, Module module, int inputId) { ^ src/ADSR.cpp:193:11: error: no matching function for call to 'createInput' addInput(createInput (prt(gx(0), gy(2)), module, ADSRBank::imap(ADSR::T... ^~~~~~~ ../../include/rack.hpp:49:7: note: candidate function [with TPort = rack::PJ301MPort] not viable: no known conversion from 'ADSRBank ' to 'rack::Module ' for 2nd argument Port createInput(Vec pos, Module *module, int inputId) { ^ 16 errors generated. make: *** [build/src/ADSR.cpp.o] Error 1

gratrix commented 7 years ago

Very quick inspection I may have missed out #include <array> at the top of gratrix.hpp - If I did I don't know how this compiled at my end!

lnikj commented 7 years ago

Fixed :) !! Got no time to play now but will look forward to this later. Modules look great. Many thanks :)

So, for anybody else who reads this:

To compile this on a mac:

  1. You need the latest dev build.

  2. In Gratrix.hpp add #include <array> to the top, and replace all instances of constexpr with inline.

  3. In chord12.cpp edit 197-200 to replace const.expr with inline.

  4. In octave.cpp do the same at 88 & 89.

DON'T do a sed replace for this edit on all the source files.

gratrix commented 7 years ago

Inikj thank you for summarising the fixes. I think they'll apply to all builds. I'll commit changes 2, 3 and 4 soon as I get time.

lnikj commented 7 years ago

You're very welcome :) Thanks so much for the modules and your help in getting them running :)

gratrix commented 7 years ago

One thing to point out, as the repo is at the moment each module will generate an SVG file. I then use a script to convert these to PNG which is currently used in the module load. I will commit a change that will disable this auto generation (which is not need as the PNGs are also committed). I had hoped to use the SVG in VCV Rack but when I tried it last the SVG fonts didn't work. Anyway, PNG is fine for now and I'll revisit this later.

lnikj commented 7 years ago

I have found that the fonts are ever so slightly fuzzy when zoomed in - is this the reason? (I am running the dev version because I have poor eyesight and love the new zoom feature).

gratrix commented 7 years ago

Yes it is because of the PNG. I'll investigate getting the SVG working.

gratrix commented 7 years ago

Now added guards to stop SVG generation.

Malifick commented 7 years ago

is the gratrix compiling ok on linux now? I'll try it again