Jojosito / MUS-X

Modules for VCV Rack
Other
4 stars 1 forks source link

Compile failure on macOS platform #11

Closed cschol closed 7 months ago

cschol commented 7 months ago
x86_64-apple-darwin20.2-clang++-libc++ -std=c++11 -stdlib=libc++  -Isrc/dsp -fPIC -I/home/build/rack-plugin-toolchain/Rack-SDK-mac-x64/include -I/home/build/rack-plugin-toolchain/Rack-SDK-mac-x64/dep/include -MMD -MP -g -O3 -funsafe-math-optimizations -fno-omit-frame-pointer -Wall -Wextra -Wno-unused-parameter
 -DARCH_X64 -march=nehalem -DARCH_MAC -mmacosx-version-min=10.9  -c -o build/src/OnePoleLP.cpp.o src/OnePoleLP.cpp
src/LFO.cpp:32:25: error: constexpr variable 'minFreq' must be initialized by a constant expression                                                       
        static constexpr float minFreq = 2 * std::pow(2, -octaveRange); // Hz                                                                                                                                                                                                                                          
                               ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                     
src/LFO.cpp:32:39: note: non-constexpr function 'pow<int, int>' cannot be used in a constant expression                                     
        static constexpr float minFreq = 2 * std::pow(2, -octaveRange); // Hz 
                                             ^
/home/build/rack-plugin-toolchain/local/osxcross/bin/../SDK/MacOSX11.1.sdk/usr/include/c++/v1/math.h:1039:1: note: declared here                          
pow(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT                                                                                                                  
^                                                                                                                                                          
src/LFO.cpp:33:25: error: constexpr variable 'maxFreq' must be initialized by a constant expression                                         
        static constexpr float maxFreq = 2 * std::pow(2,  octaveRange); // Hz 
                               ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/LFO.cpp:33:39: note: non-constexpr function 'pow<int, int>' cannot be used in a constant expression                                                   
        static constexpr float maxFreq = 2 * std::pow(2,  octaveRange); // Hz                 
                                             ^                                                          
Jojosito commented 7 months ago

replaced constexpr with const