Why do I need to add some addtitional files for the generated c code like "libmwbwpackctbb.h"?

조회 수: 3 (최근 30일)
I have a function which includes some image processing functions like imopen and imdilate. When I generate the cpp code with matlab coder, it generates the code without an error. However In the cpp files it needs some additional header files such as
"libmwbwpackctbb.h" "libmwbwunpackctbb.h" "libmwmorphop_flat_tbb.h" "libmwmorphop_packed.h" .
I know that these *.h files are in the "extern" folder of Matlab. Why Matlab does not add these files next to the generated cpp and h files automatically?
Also when I add those h files manually my cpp project compiles the code but while running the code it needs some additional libraries to run the generated cpp functions which includes imopen and imdilate functions. So it returns errors.
I couldnt find any logical answer/guide in the matlab's help page for this issue.
If I want to run the generated code in a Linux machine, I can not use the lib files that are in the "extern" folder of matlab. I need *.a files? Where do I get the *.a files for the generated cpp code of image processing functions?

답변 (1개)

Ashish Uthama
Ashish Uthama 2015년 4월 23일
Some of these functions use a library to provide the solution, like you noticed.
To bundle all the files required for a stand-alone compilation of the generated code (header files, shared libraries etc), use the packNGo option in MATLAB Coder.


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

Community Treasure Hunt

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

Start Hunting!

Translated by