Closed ATGC2 closed 6 years ago
the 3th. include should mean :
thank You in Advance Mr. Lueders.
ok, i try once again the 3th. include should mean : sstream and the 4th. include should mean: iomanip
Hi,
Sorry that I did not reply before. I am currently very busy with work.
Looking at your code, I do see two immediate errors:
VoltGeneratorWidget::VoltGenerator(VoltGenerator *module) : ModuleWidget(module) { ...
should be
VoltGeneratorWidget::VoltGeneratorWidget(VoltGenerator *module) : ModuleWidget(module) { ...
give that a try and see whether it fixes the problems.
Cheers, Martin
Hello Mr. Lueders,
could You help me please, to build my own Plugin? The Plugin should be an Voltage Generator, it consist in a Regulator from -12V to +12V with your Volt Display. The Code is as shown below:
include "Logical.hpp"
include "dsp/digital.hpp"
include
include
//------------------------------ struct VoltGenerator : Module { enum ParamIds { VOLT_PARAM, NUM_PARAMS }; enum OutputIds { VOLT_OUTPUT, NUM_OUTPUTS }; enum LightIds { BLINK_LIGHT, NUM_LIGHTS };
}; //------------------------------ void VoltGenerator::step() { float v = params[VOLT_PARAM].value; outputs[VOLT_OUTPUT].value = v; lights[BLINK_LIGHT].value = fabs(v)/12.0; volts = 0.9 * volts + 0.1; } //------------------------------ struct VoltDisplayWidget : TransparentWidget {
};
Model *modelVoltGenerator = Model::create<VoltGenerator, VoltGeneratorWidget>("Logical", "VoltGenerator", "VoltGenerator", LOGICTAG);
The Compiler Error:
c++ -std=c++11 -stdlib=libc++ -DSLUG=VoltGenerator -fPIC -I../../include -I../../dep/include -DVERSION=0.6.0 -MMD -MP -g -O3 -march=nocona -ffast-math -fno-finite-math-only -Wall -Wextra -Wno-unused-parameter -DARCH_MAC -mmacosx-version-min=10.7 -c -o build/src/VoltGenerator.cpp.o src/VoltGenerator.cpp src/VoltGenerator.cpp:83:31: error: no struct named 'VoltGeneratorWidget' in 'VoltDisplayWidget' struct VoltDisplayWidget::VoltGeneratorWidget {