【发布时间】:2012-01-04 05:37:57
【问题描述】:
我正在编写一些使用 MATLAB 提供的 C 库的代码(从 *.mat 文件中提取数据)。在我的 IDE(代码::块)中,我已经包含了包含必要“mat.h”的文件夹,该文件夹位于网络驱动器上。当我这样做时,我的代码会识别 mat.h 中定义的类型,但是每当我从文件中调用函数时,我都会收到“未定义的引用”错误。这与 MathWorks 提供的示例代码相同。这通常是什么问题造成的?
#include "mat.h"
int main (void) {
MATFile *pmat; // Compiles only when compiler is told to search in mat.h directory
pmat = matOpen("example_filename", "r"); // Never compiles
return 0;
}
谢谢! 卡梅伦
【问题讨论】:
标签: c function matlab include codeblocks