Making cpp code from Mfile.
古いコメントを表示
Hi all, I would like to use Matlab functions in my cpp project. I used command: mcc -W cpplib:liba -T link:lib odw, where odw is my Mfile. Matlab generated several files: liba.cpp liba.dll liba.exp liba.h liba.lib liba.export. I joined liba.cpp and liba.h to my Cpp, but it doesn't work. It doesn't see mclmcrrt.h and mclcppclass.h. Is it true that i have to join liba.dll too? I create my cpp project in QtCreator.
Thanks for responses! Jan
採用された回答
その他の回答 (1 件)
Titus Edelhofer
2012 年 2 月 14 日
0 投票
Hi Jan,
I would suggest to run the example from the MATLAB compiler section named "Libraries". Somewhere comes the call to mbuild to compile and link the application using the shared library. If you use the "-v" for the call to mbuild you will see what get's compiled and linked. Add the linked files to your project and it should work.
Titus
カテゴリ
ヘルプ センター および File Exchange で C Shared Library Integration についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!