在Matlab中加载库错误

时间:2017-10-06 12:21:14

标签: matlab loadlibrary

我试图通过导入qliblibrary头文件在MATLAB中使用loadlibrary但是当我使用load library命令时:

loadlibrary('qlib','qlib.h')

我收到以下错误:

  

使用loadlibrary时出错       无法预处理输入文件。        预处理器的输出是:C:\ Program Files \ MATLAB \ R2017a \ extern \ examples \ Legacy_code \ qlib.h:168:7:错误:#error        不支持的编译器/ os组合             #error unsupported编译器/ os组合

这是qlib头文件,我收到编译器错误:

#pragma message ("used compiler:   CVI LabWindows C")

    #define QLIB_WIN_32
    #define QAPICALLER _stdcall

    #ifndef FAR 
      #define FAR
    #endif   

    #ifndef WORD
        #define WORD unsigned short  
    #endif

    #pragma message ("destination OS:  Windows 9x / NT / 2000 / XP")
    #pragma message ("executable type: CVI")

#elif defined (__GNUC__)                                                /* gcc (on Linux) */

    #define FAR
    #define far

    #ifdef __unix__
        #define QLIB_LINUX
        #define QAPICALLER

    #else
        #error unsupported compiler/os combination
    #endif

#else

    #error unsupported compiler detected                                /* unknown compiler */

#endif

0 个答案:

没有答案