I have been looking
for
creating a user defined function
in
MariaDB to perform a simple task
What I have tried:
For that I created a sample c++ program
for
adding two numbers,and compiled
using
the below command
g++ -fPIC -shared Hello.cc -o
add
.so
after that I copied the shared
object
file to plugin directory.
When Iam calling the Create function syntax
CREATE FUNCTION
add
RETURNS integer SONAME
'
add.so'
;
it gives the below error
ERROR
1127
(HY000): Can
'
t find symbol '
add
'
in library.
Kindly give a solution for the same.
Probably is due to
C++
function name mangling. Try to surround function declaration with
extern
"
C"
{