我使用Matlab r2017a,当我使用'mex pq_demo.cpp'编译C ++文件时,出现了错误:
无法导出mexFunction:符号未定义
collect2.exe:错误:ld返回1退出状态
我的mexFunction位于pq_create.cpp:
#ifndef SOMETHING_H_
#define SOMETHING_H_
/* your code goes here */
#endif /* something.h */
那么,我该如何解决这个错误。谢谢!
答案 0 :(得分:-1)
首先应包括头文件mex.h
,例如#include mex.h