dhemery / DHE-Modules

VCV rack modules from Dale Emery
MIT License
33 stars 2 forks source link

build fails with GCC 5.3.1 #2

Closed davephillips closed 6 years ago

davephillips commented 6 years ago

Linux Fedora 23 Rack 0.5.x

Alas, my knowledge of C++ is insufficient to figure a fix. Any suggestions ?

g++ -fPIC -I../../include -I../../dep/include -DVERSION=0.5.0-beta.2 -MMD -g -O3 -march=nocona -ffast-math -fno-finite-math-only -Wall -Wextra -Wno-unused-parameter -DARCH_LIN -Iinclude -Wsuggest-override -std=c++11 -c -o build/src/Stage.cpp.o src/Stage.cpp In file included from include/Stage.hpp:3:0, from src/Stage.cpp:1: include/FlipFlop.hpp:21:21: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type static std::unique_ptr trigger(const std::function<float()> &signal, const std::function<void()> &onRise); ^ include/FlipFlop.hpp:26:21: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type static std::unique_ptr latch(const std::function<float()> &signal, const std::function<void()> &onRise, const std::function<void()> &onFall); ^ src/Stage.cpp: In constructor ‘DHE::Stage::Stage()’: src/Stage.cpp:22:21: error: ‘latch’ is not a member of ‘DHE::FlipFlop’ deferGate = FlipFlop::latch( ^ src/Stage.cpp:26:27: error: ‘trigger’ is not a member of ‘DHE::FlipFlop’ envelopeTrigger = FlipFlop::trigger( ^ ../../compile.mk:53: recipe for target 'build/src/Stage.cpp.o' failed make: *** [build/src/Stage.cpp.o] Error 1

dhemery commented 6 years ago

I neglected to include <memory>, which is where unique_ptr is defined. On Mac I was picking it up implicitly through some other header file, so the compiler didn't yell at me. I need include it explicitly.

I've submitted what I suspect is a fix in commit 2ddfac2987318df137e40ecf15cc42e784b5779d

I don't have a good way to test on Linux. Please let me know if this solves the problem on Linux/g++

davephillips commented 6 years ago

Thank you for the quick response & reply. The issue is fixed, your module loads without complaint in Rack 0.5.x. I'm not sure how to use it, so I'll work with it a while today to see how it handles. :) Thanks again !

dhemery commented 6 years ago

I'm glad it worked.

For usage, check the manual/wiki: https://github.com/dhemery/DHE-Modules/wiki/Stage