compiling a cpp function into a mex, then compiling that mex into a matlab exe (w/ other matlab code). What about the dll, h, and .lib files? And loadlibrary will not cut it in this case.

I would like to compile my c++ function into a mex. This function is linked to a dll library. When i compile the matlab program into a .exe, will this bring up issues with the .dll? If it works, can i compile the dll with the rest of the program? Or would I have to save the dll in the same directory as the compiled matlab executable?

回答 (2 件)

Kaustubha Govind
Kaustubha Govind 2013 年 6 月 26 日
I doubt that MATLAB Compiler will be able to determine automatically that the DLL is a required dependency. You can try adding the DLL(s) to the CTF archive by using the mcc -a option and see if that does the right thing.
ryan
ryan 2013 年 6 月 27 日
I got this to work actually. The only thing is my mex function forces matlab to exit upon completion...

カテゴリ

ヘルプ センター および File ExchangeMATLAB Compiler についてさらに検索

質問済み:

2013 年 6 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by