Since I'm using ImGui too, I'm trying to test it on Linux, and I think I'm very close ... except linking is no possible since RVar is undefined. Would you mind to define it or provide me some links to add / replace the missing definitions ? (tested with -std=c++11 to 17 without any success)
g++-8 -I/usr/local/include -I. -I./imgui -I./MathExpr/MathExpr -I./imgui/examples/libs/gl3w -DLinux -DIMGUI_UNLIMITED_FRAME_RATE -D_NO_DEBUG_HEAP=1 -Wall -std=c++17 -o build/imgui_math ./imgui/imgui.cpp ./imgui/imgui_demo.cpp ./imgui/imgui_draw.cpp ./imgui/imgui_widgets.cpp ./imgui/imgui_impl_glfw.cpp ./imgui/imgui_impl_opengl3.cpp ./imgui/examples/libs/gl3w/GL/gl3w.c ./main.cpp -lGL -lGLU -L./MathExpr -lmathexpr
./main.cpp:40:1: error: ‘RVar’ does not name a type; did you mean ‘char’?
RVar *xvar;
^~~~
char
./main.cpp:41:1: error: ‘RVar’ does not name a type; did you mean ‘char’?
RVar* vararray[1];
^~~~
char
./main.cpp:42:1: error: ‘ROperation’ does not name a type
ROperation *op;
^~~~~~~~~~
./main.cpp: In function ‘double Func(double)’:
./main.cpp:138:6: error: ‘op’ was not declared in this scope
y = op->Val();
^~
./main.cpp: In function ‘void ElaborateFunction()’:
./main.cpp:147:2: error: ‘xvar’ was not declared in this scope
xvar = new RVar("x", &funx);
^~~~
./main.cpp:147:2: note: suggested alternative: ‘char’
xvar = new RVar("x", &funx);
^~~~
char
./main.cpp:147:13: error: expected type-specifier before ‘RVar’
xvar = new RVar("x", &funx);
^~~~
./main.cpp:148:2: error: ‘vararray’ was not declared in this scope
vararray[0] = xvar;
^~~~~~~~
./main.cpp:148:2: note: suggested alternative: ‘va_arg’
vararray[0] = xvar;
^~~~~~~~
va_arg
./main.cpp:149:2: error: ‘op’ was not declared in this scope
op = new ROperation(function, 1, vararray);
^~
./main.cpp:149:11: error: expected type-specifier before ‘ROperation’
op = new ROperation(function, 1, vararray);
^~~~~~~~~~
FYI, RVar in Math.exe (using nm) reveals a lot of functions using RVar symbols.
nm Math.exe | grep RVar
000000000047ed83 T _Z11IsolateVarsRPciPP4RVariPP9RFunction
000000000047ef61 T _Z14IsolateNumbersRPciPP4RVariPP9RFunction
000000000047e967 T _Z5IsVarPKciiPP4RVar
0000000000480e48 T _ZeqRK4RVarS1_
000000000047f130 T _ZN10ROperationC1EPciPP4RVariPP9RFunction
000000000047caa4 T _ZN10ROperationC1ERK4RVar
000000000047f130 T _ZN10ROperationC2EPciPP4RVariPP9RFunction
000000000047caa4 T _ZN10ROperationC2ERK4RVar
000000000047bb70 T _ZN4RVarC1EPKcPd
000000000047bb24 T _ZN4RVarC1ERKS_
000000000047bb70 T _ZN4RVarC2EPKcPd
000000000047bb24 T _ZN4RVarC2ERKS_
000000000047bbac T _ZN4RVarD1Ev
000000000047bbac T _ZN4RVarD2Ev
000000000047c05c T _ZN9RFunctionC1ERK10ROperationiPP4RVar
000000000047bf94 T _ZN9RFunctionC1ERK10ROperationP4RVar
000000000047c05c T _ZN9RFunctionC2ERK10ROperationiPP4RVar
000000000047bf94 T _ZN9RFunctionC2ERK10ROperationP4RVar
0000000000481016 T _ZNK10ROperation10ContainVarERK4RVar
00000000004817e4 T _ZNK10ROperation10SubstituteERK4RVarRKS_
000000000048198a T _ZNK10ROperation4DiffERK4RVar