当前位置:网站首页>Call vs2015 with MATLAB to compile vs Project
Call vs2015 with MATLAB to compile vs Project
2022-07-02 23:08:00 【Clouds_ Above】
use matlab call vs2015 To compile the vs engineering
One 、 background :
When testing simulation models, you need to automate batch testing . The input of the model is an encrypted task file . This document is for big guys cpp Written , Need to use vs compile .
Two 、 Purpose :
So the function I want to achieve is :
- use matlab The script sets different task information , Automatically generate different cpp Program .
- call vs compile , Generate encrypted task file
- call simulink Run the model , Simulation task execution
- Compare task execution with m What is expected when the script is set
So you can do it matlab Realize the whole process simulation test under the environment .
3、 ... and 、 Realization
The basic realization idea is to use matlab The script uses dos Command implementation to vs Call to .
( This method can actually call all software )
3.1. Configuration environment
First you need to add environment variables , Put the required header file include And libraries lib add
Create a new variable , be known as include( Case insensitive ), Then the variable value has the following two :
D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include
Similarly , Create a new variable , be known as lib( Case insensitive ), Then the variable value has the following two :
D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib
Others if necessary , Just add :
stay include Add below :
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt
stay lib Add below :
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x86
In order to be able to use devenv command , Still need to be in path Add below :
D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
3.2. Automatically compiled dos command
After adding these environments , If you want to compile ordinary cpp Program , You can use commands on the command line :
cl xxx_main.cpp
But the compilation project is still not good , You need to use the following command :
devenv "TestProg.sln" /Rebuild Debug /project "xxx\TestProg.vcxproj"
Will compile executable programs , Then run the executable program
3.3. matlab Script
This part is worth expanding ,
It should be noted that , If you want to execute something in a directory dos command
Need direct cd(‘xxxx’) go in .
And not dos(‘cd xxxxxx’)
Put the above command executed on the command line , stay matlab Used in script dos Call
Such as :
dos('devenv "TestProg.sln" /Rebuild Debug /project "xxx\TestProg.vcxproj"')
边栏推荐
- [leetcode] there are duplicate elements [217]
- 中国信通院、清华大学、腾讯安全,云原生安全产学研用强强联合!
- SQL进阶语法
- ServletContext learning diary 1
- 20220524_数据库过程_语句留档
- PotPlayer设置最小化的快捷键
- 严守工期,确保质量,这家AI数据标注公司做到了!
- PMP project integration management
- 阿里云有奖体验:如何使用 PolarDB-X
- Jerry's built-in short press and long press, no matter how long it is, it is a short press [chapter]
猜你喜欢

RecyclerView结合ViewBinding的使用

Is 408 not fragrant? The number of universities taking the 408 examination this year has basically not increased!

从2022年Q1财报看携程的韧性和远景

地平线2022年4月最新方案介绍

PotPlayer设置最小化的快捷键

Value sequence < detailed explanation of daily question >

【硬件】标准阻值的由来

海思 VI接入视频流程

QT qpprogressbar details

Start from the bottom structure to learn the customization and testing of FPGA --- Xilinx ROM IP
随机推荐
Array advanced improvement
详解Promise使用
[Luogu p1541] tortoise chess [DP]
Go语言sqlx库操作SQLite3数据库增删改查
[adjustment] postgraduate enrollment of Northeast Petroleum University in 2022 (including adjustment)
Looking at Ctrip's toughness and vision from the Q1 financial report in 2022
China Academy of information technology, Tsinghua University, Tencent security, cloud native security, industry university research and use strong alliance!
Niuke network: maximum submatrix
数据标注典型案例,景联文科技如何助力企业搭建数据方案
MySQL reset password, forget password, reset root password, reset MySQL password
數據分析學習記錄--用EXCEL完成簡單的單因素方差分析
Loss function~
深度剖析数据在内存中的存储----C语言篇
Set right click to select vs code to open the file
BBR 遭遇 CUBIC
Splunk audit 的设定
Start from the bottom structure to learn the customization and testing of FPGA --- Xilinx ROM IP
解决Chrome浏览器和Edeg浏览器主页被篡改的方法
To myself who is about to work
Strictly abide by the construction period and ensure the quality, this AI data annotation company has done it!