"libraryComplier" app can't complie simple matlab code?

4 views (last 30 days)
When I write a simple program test package, the following error will appear, how to solve it? My myadd function is:
function sum =myadd(x,y)
sum = x+y;
error log: mcc -W cpplib:myadd -T link:lib -d D:\Matlab_files\fitcircle\myadd\for_testing -v D:\Matlab_files\fitcircle\myadd.m Compiler version: 6.5 (R2017b)
Dependency analysis by REQUIREMENTS.
Unexpected error while determining required deployable files. Compilation terminated. Details: 错误使用 matlab.depfun.internal.database.SqlDbConnector/doSql Received exception upon attempting an operation. Exception: [The database <file:C%3A%5CProgram%20Files%5CMATLAB%5CR2017b%5Ctoolbox%5Cmatlab%5Cdepfun%5C%2Bmatlab%5C%2Bdepfun%5C%2Binternal%5Crequirements%5Fwin64%5Fdfdb?mode=ro> is corrupt. (database disk image is malformed)]. Details: [SELECT Name FROM Target WHERE ID IN (SELECT DISTINCT Target FROM Component_Path_Item)]. 出错 matlab.depfun.internal.SearchPath/read_targets_from_database (line 508) db.doSql(query); 出错 matlab.depfun.internal.SearchPath (line 872) s.KnownTargets = read_targets_from_database(s); 出错 matlab.depfun.internal.requirements (line 141) s = matlab.depfun.internal.SearchPath('MCR', varargin{2:end}); 出错 matlab.depfun.internal.mcc_call_requirements (line 8) [parts, resources, exclusions] = matlab.depfun.internal.requirements(items, varargin{:});
mcc 失败。

Answers (1)

Gowtham Uma Maheswari Jaganathan
The error message indicates there could some file corruption that could have happened on your machine. You can try
2. Try reinstalling MATLAB on your machine, so that you can have all the files without any corruption.
I hope this helps.

Categories

Find more on Package MATLAB Functions in Help Center and File Exchange

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!