Getting Matlab compiled libraries to work in ROS
I have created a library (myImShow.h & myImShow.so files) from the Matlab library compiler.
Later I have created a C++ program that calls the functions inside the library. I was able to add these libraries into a ROS package CMakeLists, compile and run the program with no errors only if I don't add the ros::init(argc, argv, "image_listener");
If I do add the ros::init()
to the code when it tries to initialize the mcl
if (!mclInitializeApplication(NULL,0))
{
std::cerr << "Could not initialize the application properly."
<< std::endl;
return -1;
}
I get the following error from the MCR
An Error has occurred while trying to initialize the MCR.
The error is: Fatal error loading library /home/lar5/ProgramFiles/MATLAB/bin/glnxa64/libmat.so Error: /home/lar5/ProgramFiles/MATLAB/bin/glnxa64/libicuio.so.52: undefined symbol: _ZN6icu_5213UnicodeString9doReplaceEiiPKDsii
It seems that there is a conflict with ROS when trying to run both of the libraries together.
Has anyone ever successfully add a library compiled by Matlab with ROS?