0
$\begingroup$

Rosanswers logo

Hello,

I'm trying to compile a ROS node that calls functions from a dynamic c++ library created using MatLab's mcc compiler. This requires me to compile against the library I wrote as well as the matlab mcl libraries which allow mcc'd libraries to be deployed.

The .so and .h files for the library I wrote are in my src folder, and appear to be linking to the node code correctly. However, I receive the error message "fatal error: mclmcrrt.h: No such file or directory" when running make.

mclmcrrt.h is the primary header file for mcc library deployment, located at /opt/matlab/extern/include/. How do I indicate to cmake that it can find the required files at this location?

Thanks


Originally posted by ttosun on ROS Answers with karma: 13 on 2012-02-18

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Try adding the following line to your CMakeLists.txt file:

include_directories (/opt/matlab/extern/include)

Originally posted by Thomas D with karma: 4347 on 2012-02-18

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by ttosun on 2012-02-19:
Thanks! That worked.

Comment by Enrique Fernandez on 2013-03-27:
Hi!Did this work?I want to do the same but my program crashes during runtime when calling mclInitializeApplication(NULL,0).I'm using MATLAB R2012b and fuerte. Any help would be immensely welcome as I'm really struggling with this http://answers.ros.org/question/59302/matlab-mrc-engine-and-ros/

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.