C中有关matOpen的错误 [英] a error about matOpen in C

查看:334
本文介绍了C中有关matOpen的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为标题

ubuntu 9.10,matlab R2009a
我的matlabroot位于/opt/matlab78
我想使用C程序读取MAT文件
而且我使用了matOpen()但它不起作用

as title

ubuntu 9.10 , matlab R2009a
my matlabroot is in /opt/matlab78
i want to use a C program to read a MAT-File
and i use the matOpen() but it doesnt work

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "/opt/matlab78/extern/include/mat.h"

int main()
{
        const char *file = "meas_even_ch001.mat";
        MATFile *pmat;
        pmat = matOpen(file, "r");
        printf("reading file %s", file);
}





错误消息





the error message

/tmp/ccmGeyCL.o: In function ''main'':
readmatfile.c:(.text+0x27): undefined reference to ''matOpen''
collect2: ld returned 1 exit status





我尝试在〜/.bashrc
中添加LD_LIBRARY_PATH 但仍然会出现相同的错误

导出LD_LIBRARY_PATH =/opt/matlab78/bin/glnx86:/opt/matlab78/sys/os/glnx86:$ LD_LIBRARY_PATH

有人知道如何解决吗?





and i try to add LD_LIBRARY_PATH in ~/.bashrc
but it still get the same error

export LD_LIBRARY_PATH=/opt/matlab78/bin/glnx86:/opt/matlab78/sys/os/glnx86:$LD_LIBRARY_PATH

does anyone know how to solve it?

推荐答案

LD_LIBRARY_PATH

有人知道如何解决吗?
LD_LIBRARY_PATH

does anyone know how to solve it?


这篇关于C中有关matOpen的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆