当前位置:网站首页>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"')
边栏推荐
猜你喜欢

力扣刷题(2022-6-28)

Webrtc audio and video capture and playback examples and mediastream media stream analysis

Chow-Liu Tree

密码技术---分组密码的模式

4 special cases! Schools in area a adopt the re examination score line in area B!

Splunk audit setting

C#中Linq用法汇集

Odoo13 build a hospital HRP environment (detailed steps)

PotPlayer设置最小化的快捷键

Xshell configuration xforward forwarding Firefox browser
随机推荐
2016. 增量元素之间的最大差值
Jerry's prototype has no touch, and the reinstallation becomes normal after dismantling [chapter]
用matlab调用vs2015来编译vs工程
Easyclick, EC Quanlang network verification source code
Lambda表达式:一篇文章带你通透
Jerry's fast touch does not respond [chapter]
Go语言sqlx库操作SQLite3数据库增删改查
[chestnut sugar GIS] how does global mapper batch produce ground contour lines through DSM
[adjustment] postgraduate enrollment of Northeast Petroleum University in 2022 (including adjustment)
Jinglianwen technology's low price strategy helps AI enterprises reduce model training costs
[leetcode] there are duplicate elements [217]
Start from the bottom structure to learn the customization and testing of FPGA --- Xilinx ROM IP
损失函数~
数据分析学习记录(二)---响应曲面法及Design-Expert的简单使用
ServletContext learning diary 1
World Environment Day | Chow Tai Fook serves wholeheartedly to promote carbon reduction and environmental protection
Is 408 not fragrant? The number of universities taking the 408 examination this year has basically not increased!
Qt QScrollArea
[npuctf2020]ezlogin XPath injection
Detailed explanation and application of merging and sorting