Error on compile: error: Cheerp: [[cheerp::jsexport]] function 'rect' cannot have default arguments
smilo7 opened this issue · comments
Milo commented
When compiling on linux (arch) with cheerp compiled from source.
then following instructions to build in README I get the following error when calling make.
Copying files
\033[0;36m\r\nmaximilian.transpile.js — Transpiling to pure JS\r\n \x1b[0m
/opt/cheerp/bin/clang++ -DCHEERP -cheerp-pretty-code -cheerp-no-math-imul -cheerp-no-math-fround -cheerp-force-typed-arrays -O3 -target cheerp -Isrc/maximilian/src -o ./maximilian.transpile.js src/maximilian/js/purejs/maxi-purejs.cpp src/maximilian/src/maximilian.cpp
In file included from src/maximilian/js/purejs/maxi-purejs.cpp:2:
src/maximilian/src/maximilian.h:157:40: error: Cheerp: [[cheerp::jsexport]] function 'rect' cannot have default arguments
double rect(double frequency, double duty=0.5);
^
1 error generated.
In file included from src/maximilian/src/maximilian.cpp:34:
src/maximilian/src/maximilian.h:157:40: error: Cheerp: [[cheerp::jsexport]] function 'rect' cannot have default arguments
double rect(double frequency, double duty=0.5);
^
1 error generated.
make: *** [Makefile:138: full] Error 1
Removing the default parameter 0.5
for duty
allows for compilation.
Milo commented
fixed