Compiled DLL doesn't work on target machine

5 ビュー (過去 30 日間)
Jan
Jan 2013 年 8 月 14 日
コメント済み: Image Analyst 2013 年 11 月 1 日
Hello
I've built a DLL using the Matlab Compiler Toolbox, which I would now like to integrate into a Visual Studio project. Everything compiles nicely, but the program can not be started. Instead I keep getting the 'mclmcr.dll not found' error. I've tried just about anything I was able to find in the net (adding the compiler runtime path to the system path / reinstalling the compiler runtime provided in the Matlab compiler package).
My question: am I missing something? Might it be a problem, that the dll was built on a different machine (with the same architecture) from that where I'm trying to build the c++ project?
Any comments are very welcome!
  2 件のコメント
Kaustubha Govind
Kaustubha Govind 2013 年 8 月 14 日
Did you use the MCRInstaller from the same installation of MATLAB that you used to compile the DLL?
Jan
Jan 2013 年 8 月 15 日
Yes, I tried that but unfortunately it didn't make any difference...

サインインしてコメントする。

採用された回答

Jan
Jan 2013 年 8 月 15 日
編集済み: Jan 2013 年 8 月 15 日
I managed to work around the problem by adding two entries to the system's path variable:
[Matlab Compiler Runtime Path]\[version]\bin\win32
[Matlab Compiler Runtime Path]\[version]\runtime\win32
I had tried that before, but had unfortunately added a space character after the semicolon following the previous entry. This obviously corrupted the variable in such a way, that no entry following the space character was included (a really avoidable mistake which took hours out of my time to figure out...)
However, it would be nice to know why changing the system's path variable was neccessary in the first place.

その他の回答 (1 件)

Stan
Stan 2013 年 11 月 1 日
I noticed a similar problem (MATLAB R2013A 64bit). My program crashes when it calls the MATLAB function. Thread error: Clr20R3 (System.DllNotFoundException).

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by