Why does my library built with Application Compiler crash due to undefined function 'pathdef'?

3 views (last 30 days)
I am building a .Net class library dll which wraps some Matlab functions in .m files. The build completes and the .dll is produced. I can reference the DLL in a .Net project, but when the project runs, I see these errors in the debugger:
%
'Example1.exe' (CLR v4.0.30319: Example1.exe):
Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\MWArray\v4.0_2.17.1.0__e1d84a0da19db86f\MWArray.dll'.
Undefined function or variable 'pathdef'.
Error in startup (line 1)
Exception thrown: 'System.ApplicationException' in MWArray.dll
Exception thrown: 'System.Exception' in MWArray.dll
and the class doesn't load. My scripts do not call pathdef. What is wrong?

Answers (1)

Sindhu Yerragunta
Sindhu Yerragunta on 3 May 2018
Hi Morris,
Try executing the following commands from MATLAB command prompt,
restoredefaultpath % This will remove any custom paths
rehash toolboxcache
savepath
and refer the following link for more information regarding the same error,
Hope this helps.
- Sindhu

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!