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!