How to include header files in Mexfiles
古いコメントを表示
Hi, I am trying to make a mex file from c code. which is calling a c function( with header file myImage.h included in this.)
#include "myImage.h"
Now I am trying to call this mexfunction in matlab. But I am getting the error
undefined reference to _new_image.
new_image is defined under the header file myImage.h , so it seems like mex is not able to identify the header file. The header file is in the current working directory it self even though I tried command -l and -L to give the path of header file but it does not work.
Does anybody know what is the problem here?
Thanks in advance.
3 件のコメント
Kaustubha Govind
2013 年 9 月 11 日
Are you also linking in the C file that contains the definition of the function new_image?
Jan
2013 年 9 月 12 日
I'd expect another error message, when the header file is not found. Therefore I think, there is another problem.
Heema
2013 年 9 月 13 日
回答 (1 件)
Kaustubha Govind
2013 年 9 月 16 日
0 投票
It looks like there is a programming error in your code. Please debug your MEX-file and post code snippets of the line(s) that cause the SegV.
カテゴリ
ヘルプ センター および File Exchange で Introduction to Installation and Licensing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!