필터 지우기
필터 지우기

mcc and startup

조회 수: 11 (최근 30일)
Mateusz
Mateusz 2011년 8월 19일
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?

답변 (1개)

Kaustubha Govind
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.

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by