How can I pass arguments to mclRunMain (argc and argv) while using a MATLAB generated C++ shared library?

Is there any example which shows how to pass and accept command line arguments in "mclRunMain" while using MATLAB generated C++ shared library?

 Réponse acceptée

It is possible to pass command line arguments to "mclRunMain" while integrating a MATLAB generated C++ shared library. Please find an attached example which includes an implemented simple string concatenation function which accept 2 strings from the command line and prints the concatenated string. I have used the following MATLAB code to create shared library:
 
function out = concatString(input1,input2)
out = strcat(input1,input2);
end
Refer to the attached C++ code to see how to integrate this shared library.
Also, refer to the following link to see how to integrate the C++ shared library in your code: <https://www.mathworks.com/help/compiler_sdk/cxx/integrate-a-cc-shared-library-into-an-application.html>

Plus de réponses (0)

Produits

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by