当前位置:网站首页>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"')
边栏推荐
- Construction of Hisilicon 3559 universal platform: rotation operation on the captured YUV image
- pytorch训练CPU占用持续增长(bug)
- Looking at Ctrip's toughness and vision from the Q1 financial report in 2022
- LeetCode 968. Monitor binary tree
- Jerry's prototype has no touch, and the reinstallation becomes normal after dismantling [chapter]
- The kth largest element in the [leetcode] array [215]
- Jerry's prototype will trigger shutdown after multiple touches [chapter]
- Detailed explanation and application of merging and sorting
- [NPUCTF2020]ezlogin xPATH注入
- antd组件upload上传xlsx文件,并读取文件内容
猜你喜欢

xshell配置xforward转发火狐浏览器

Niuke network: maximum submatrix

深度剖析数据在内存中的存储----C语言篇

Redis 过期策略+conf 记录

Data analysis learning records -- complete a simple one-way ANOVA with Excel
![[Solved] Splunk: Cannot get username when all users are selected“](/img/13/1e824c8005701e21fc5b4e73308d53.png)
[Solved] Splunk: Cannot get username when all users are selected“

力扣刷题(2022-6-28)

odoo13搭建医院HRP环境(详细步骤)

损失函数~

mysql重置密码,忘记密码,重置root密码,重置mysql密码
随机推荐
psnr,ssim,rmse三个指标的定量分析
Higher order operation of bits
Loss function~
Odoo13 build a hospital HRP environment (detailed steps)
数据标注典型案例,景联文科技如何助力企业搭建数据方案
Qt QSplitter拆分器
Brief introduction of emotional dialogue recognition and generation
从底层结构开始学习FPGA----Xilinx ROM IP的定制与测试
海思 VI接入视频流程
数据分析学习记录--用EXCEL完成简单的单因素方差分析
[chestnut sugar GIS] how does global mapper batch produce ground contour lines through DSM
分布式监控系统zabbix
Tronapi-波场接口-源码无加密-可二开--附接口文档-基于ThinkPHP5封装-作者详细指导-2022年7月1日08:43:06
Minimum spanning tree
Static file display problem
[leetcode] reverse string [344]
Detailed explanation and application of merging and sorting
ping域名报错unknown host,nslookup/systemd-resolve可以正常解析,ping公网地址通怎么解决?
Addition, deletion, modification and query of handwritten ORM (object relationship mapping)
QT qpprogressbar details