VS 编译 matlab 的 m 文件

本文详细介绍了如何使用MATLAB环境选择并配置编译器,以及使用mcc命令构建独立MATLAB应用程序的过程。通过操作示例,展示了如何在特定目录下生成所需的应用程序文件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 1  mex-setup

    Select a compiler:

    [1] Borland C++Builder version 5.0 in C:\Program Files\Borland

    [2] Lcc C version 2.4 inF:\SOFT\SHARE\MATLAB65\sys\lcc

    [3] Microsoft Visual C/C++ version 6.0 in C:\Program Files\Microsoft Visual Studio

    [0] None

     

    Compiler:


 2  mbuild –setup

    Please choose your compiler for building standalone MATLAB applications:  
    Would you like mbuild to locate installed compilers [y]/n? y
    Select a compiler:
    [1] Borland C++Builder version 5.0 in C:\Program Files\Borland
    [2] Lcc C version 2.4 in F:\SOFT\SHARE\MATLAB65\sys\lcc
    [3] Microsoft Visual C/C++ version 6.0 in C:\Program Files\Microsoft Visual Studio
    [0] None
 
    Compiler:


3  在matlab命令行中输入:

   mcc -t -h -L C -W lib:lib_name -T link:lib m_file.m
   以发现在m_file.m所在的目录中产生了一大堆文件.








评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值