If any code in ExprFunctions.hpp or ExprUtil.hpp causes a compilation error, GSQL cannot install any GSQL query, even if the GSQL query doesn’t call any user-defined function. Therefore, please test each new user-defined expression function after adding it. One way of testing the function is creating a new cpp file test.cpp and compiling it by
g++ test.cpp
./a.out
You might need to remove the include header #include <gle/engine/cpplib/headers.hpp> in ExprFunction.hpp and ExprUtil.hpp in order to compile.
@Jon_Herke yes i tried instructions mentioned in that link and here is the error i am getting while compiling the code
$ g++ test.cpp
In file included from test.cpp:2:0:
ExprFunctions.hpp:67:10: error: ‘ListAccum’ does not name a type
inline ListAccum string_split(string str, string delimiter) {
^
test.cpp:9:8: error: ‘ListAccum’ does not name a type
inline ListAccum string_split(string str, string delimiter) {
^
I’m afraid I haven’t had time to try this myself, but I’d guess the problem is you haven’t supplied a type to the returned type in the inital declaration. Try adding or similar to the return type in the declaration i.e.: