mcc and startup
2 ビュー (過去 30 日間)
古いコメントを表示
Hi,
In startup.m in my home directory I use addpath to include additional libraries. Now I would like to compile some source file in this way that mcc tries to read startup.m at the beginning and then it compiles the source together with included folders from startup.m.
For instance I want to compile file d.m that uses library Lib. Now I can do this using option -I, that is mcc -m d.m -I Lib. However, for some reason I would prefer to have file startup.m with addpath(Lib), and use only mcc -m d.m. Is it possible to do this?
0 件のコメント
回答 (1 件)
Kaustubha Govind
2011 年 8 月 19 日
The MATLAB path (that you add to using addpath) is only used to resolve MATLAB/Simulink related files (like .m, .p, .mat, mexw32, .mdl, etc). MCC does resolve any functions (or other MATLAB files) called from your application using the path. However, I don't believe library/object files can be resolved in the same way. This is because mcc hands off compilation of the generated C/C++ files to whatever compiler you choose using "mbuild -setup". So it isn't really MATLAB that is trying to resolve the symbols, but your linker.
0 件のコメント
参考
カテゴリ
Help Center および 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!