当前位置:网站首页>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"')
边栏推荐
- Distributed monitoring system ZABBIX
- [Solved] Splunk: Cannot get username when all users are selected“
- STM32串口DAM接收253字节就死机原因排查
- [adjustment] postgraduate enrollment of Northeast Petroleum University in 2022 (including adjustment)
- Static file display problem
- STM32之ADC
- World Environment Day | Chow Tai Fook serves wholeheartedly to promote carbon reduction and environmental protection
- Jerry's charge unplugged, unable to touch the boot [chapter]
- Construction of Hisilicon 3559 universal platform: draw a frame on the captured YUV image
- 从底层结构开始学习FPGA----Xilinx ROM IP的定制与测试
猜你喜欢
随机推荐
密码技术---密钥和SSL/TLS
Jinglianwen technology's low price strategy helps AI enterprises reduce model training costs
海思3559万能平台搭建:在截获的YUV图像上旋转操作
地平线2022年4月最新方案介绍
Odoo13 build a hospital HRP environment (detailed steps)
The first batch of Tencent cloud completed the first cloud native security maturity assessment in China
xshell配置xforward转发火狐浏览器
China Academy of information technology, Tsinghua University, Tencent security, cloud native security, industry university research and use strong alliance!
Introduction to the latest plan of horizon in April 2022
Configuration clic droit pour choisir d'ouvrir le fichier avec vs Code
Splunk audit 的设定
Successfully changed Splunk default URL root path
首批 | 腾讯云完成国内首个云原生安全成熟度评估
Mask R-CNN
Brief introduction of emotional dialogue recognition and generation
数据分析学习记录--用EXCEL完成简单的单因素方差分析
Jatpack------LiveData
Learning Websites commonly used by circuit designers
海思3559万能平台搭建:在截获的YUV图像上画框
Splunk audit setting









