I am trying to link a cpp file with Scilab 5.5.2, using the following code
// This file is released under the 3-clause BSD license. See COPYING-BSD.
function builder_gw_cpp()
WITHOUT_AUTO_PUTLHSVAR = %t;
tbx_build_gateway("skeleton_cpp9990", ..
["imread","opencv_imread"], ..
["opencv_imread.cpp"], ..
get_absolute_file_path("builder_gateway_cpp.sce"),[],"g++ -ggdb `pkg-config --cflags opencv` -o `basename opencv_imread.cpp .cpp` opencv_imread.cpp `pkg-config --libs opencv`");
endfunction
builder_gw_cpp();
clear builder_gw_cpp; // remove builder_gw_cpp on stack
When I execute these commands:
1)exec builder_gateway_cpp.sce
2)exec loader.sce.
I get an error like this:
addinter(libskeleton_cpp6969_path + filesep() + 'libskeleton_cpp69690' + getdynlibext(), 'libskeleton_cpp69690', list_functions);
Link failed for dynamic library '/home/tess/work/functions/imcrop//libskeleton_cpp69690.so'.
An error occurred: /home/tess/work/functions/imcrop//libskeleton_cpp69690.so: undefined symbol: _ZN2cv3Mat10deallocateEv
Link failed for dynamic library '/home/tess/work/functions/imcrop//libskeleton_cpp69690.so'.
An error occurred: /home/tess/work/functions/imcrop//libskeleton_cpp69690.so: undefined symbol: _ZN2cv3Mat10deallocateEv
dynlibext(), 'libskeleton_cpp69690', list_functions)
!--error 236
addinter: The shared archive was not loaded: (null)
at line 15 of exec file called by :
exec loader.sce
The symbols are found in libopencv_imgproc.
- How do I ensure the code finds the required libraries?
ldd /home/tess/work/functions/imcrop//libskeleton_cpp69690.so? - spoorcc