在Matlab中编译c/c++代码需要安装mex
1 >> mex -setup 2 3 Welcome to mex -setup. This utility will help you set up 4 a default compiler. For a list of supported compilers, see 5 http://www.mathworks.com/support/compilers/R2012b/win64.html 6 7 Please choose your compiler for building MEX-files: 8 9 Would you like mex to locate installed compilers [y]/n? y 10 11 Select a compiler: 12 [1] Microsoft Visual C++ 2010 in C:\Program Files (x86)\Microsoft Visual Studio 10.0 13 14 [0] None 15 16 Compiler: [1] 17 Please select from 0-1 18 Compiler: 1 19 20 Please verify your choices: 21 22 Compiler: Microsoft Visual C++ 2010 23 Location: C:\Program Files (x86)\Microsoft Visual Studio 10.0 24 25 Are these correct [y]/n? y 26 27 *************************************************************************** 28 Warning: MEX-files generated using Microsoft Visual C++ 2010 require 29 that Microsoft Visual Studio 2010 run-time libraries be 30 available on the computer they are run on. 31 If you plan to redistribute your MEX-files to other MATLAB 32 users, be sure that they have the run-time libraries. 33 *************************************************************************** 34 35 36 Trying to update options file: C:\Users\yangfan\AppData\Roaming\MathWorks\MATLAB\R2012b\mexopts.bat 37 From template: D:\Program Files\MATLAB\MATLAB Production Server\R2012b\bin\win64\mexopts\msvc100opts.bat 38 39 Done . . . 40 41 ************************************************************************** 42 Warning: The MATLAB C and Fortran API has changed to support MATLAB 43 variables with more than 2^32-1 elements. In the near future 44 you will be required to update your code to utilize the new 45 API. You can find more information about this at: 46 http://www.mathworks.com/help/techdoc/matlab_external/bsflnue-1.html 47 Building with the -largeArrayDims option enables the new API. 48 ************************************************************************** 49
解决问题:
Error: ARCH: Unsupported platform.
参考文献:
http://blog.csdn.net/daiyuchao/article/details/5362140
作者:太一吾鱼水
文章未经说明均属原创,学习笔记可能有大段的引用,一般会注明参考文献。
欢迎大家留言交流,转载请注明出处。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· Vue3状态管理终极指南:Pinia保姆级教程
2013-11-30 一个几何类库GPC