当前位置:网站首页>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"')
边栏推荐
- 海思3559万能平台搭建:在截获的YUV图像上画框
- 中国信通院、清华大学、腾讯安全,云原生安全产学研用强强联合!
- Loss function~
- SQL进阶语法
- Sword finger offer II 099 Sum of minimum paths - double hundred code
- [leetcode] number of palindromes [9]
- Antd component upload uploads xlsx files and reads the contents of the files
- Innovation strength is recognized again! Tencent security MSS was the pioneer of cloud native security guard in 2022
- 数据分析学习记录--用EXCEL完成简单的单因素方差分析
- 归并排序详解及应用
猜你喜欢
数据标注典型案例,景联文科技如何助力企业搭建数据方案
Higher order operation of bits
`Usage of ${}`
Minimum spanning tree
Xshell configuration xforward forwarding Firefox browser
地平线2022年4月最新方案介绍
mysql重置密码,忘记密码,重置root密码,重置mysql密码
QT qsplitter splitter
数据分析学习记录--用EXCEL完成简单的单因素方差分析
[Solved] Splunk: Cannot get username when all users are selected“
随机推荐
Go语言sqlx库操作SQLite3数据库增删改查
Learning Websites commonly used by circuit designers
海思调用接口之Makefile配置
Innovation strength is recognized again! Tencent security MSS was the pioneer of cloud native security guard in 2022
Generics and reflection, this is enough
Methods to solve the tampering of Chrome browser and edeg browser homepage
电路设计者常用的学习网站
Uniapp wechat login returns user name and Avatar
Mask R-CNN
泛型与反射,看这篇就够了
[npuctf2020]ezlogin XPath injection
密码技术---密钥和SSL/TLS
程序员版本的八荣八耻~
數據分析學習記錄--用EXCEL完成簡單的單因素方差分析
中国信通院、清华大学、腾讯安全,云原生安全产学研用强强联合!
Loss function~
20220527_数据库过程_语句留档
Is 408 not fragrant? The number of universities taking the 408 examination this year has basically not increased!
Chow-Liu Tree
Construction of Hisilicon 3559 universal platform: rotation operation on the captured YUV image