MATLAB R2023b配置Fortran编译器

MATLAB R2023b配置Fortran编译器

  • 引言
  • 1. 安装Visual Studio 2019
  • 2. 安装Intel API2024
  • 3. 配置xml文件文件
  • 4. 设置环境变量
  • 5. MATLAB编译Fortran

引言

当我们需要用到MATLAB编译Fortran代码后进行调用计算时,整个配置流程较繁琐。下面以MATLAB R2023b为例,介绍配置Fortran编译器的流程以及中间可能遇到的问题。
我的版本:
MATLAB R2023b:”https://mp.weixin.qq.com/s/KclU24GCUQj70j1s_cqE2g“
Visual Studio 2019:”https://mp.weixin.qq.com/s/Pc5U7lBrhUq06MYj6hSJWw“,(或:”https://learn.microsoft.com/zh-cn/visualstudio/releases/2019/release-notes”)
w_BaseKit_p_2024.2.1.101_offline.exe:”https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html“
w_BaseKit_p_2024.2.1.101_offline.exe:”https://www.intel.com/content/www/us/en/developer/tools/oneapi/hpc-toolkit-download.html“

1. 安装Visual Studio 2019

我尝试了使用Visual Studio 2022进行配置,但是出现了在MATLAB中使用MEX -setup命令,能够正常显示编译器,但是在使用MEX编译Fortran代码时出现了“错误使用 mex ‘ifx’ 不是内部或外部命令,也不是可运行的程序 或批处理文件”的提示,具体原因可能是”G:\Program Files (x86)\Intel\oneAPI\compiler\2024.2\bin“文件夹中的ifx.exe不能识别,未找到解决办法。因此就选择卸载VS2022,重新安装VS2019。

VS2019安装包在如下链接可以下载:https://mp.weixin.qq.com/s/Pc5U7lBrhUq06MYj6hSJWw

但是在下载的过程中又出现了下载速度贼慢的问题。后来按照网上检索的一个修改hosts的办法,亲测有效,如果没有遇到这个问题可直接跳过,进行第2步
1.使用DNS查找工具网站”https://tool.chinaz.com/dns/?type=1&host=download.visualstudio.microsoft.com&ip=“,查询微软的下载网站的域名 download.visualstudio.microsoft.com 找到TTL最低的那个节点。
在这里插入图片描述
2.找到TTL值最小的那个节点,复制IP地址,在我这里对应的最小IP就是 103.208.44.30。如下所示:
在这里插入图片描述
3.以记事本形式,打开”C:\Windows\System32\drivers\etc“文件夹下的hosts文件,在hosts里加入 IP地址+微软的下载网站的域名
在这里插入图片描述
这里可能需要另存后,再复制粘贴进这个文件夹里。
在这里插入图片描述
3.打开cmd,刷新dns,然后在ping一下微软的下载地址,查看hosts文件有没有生效。具体步骤如下:
(1)在cmd中输入ipconfig /flushdns 刷新dns
(2)ping微软的下载地址,在cmd中输入:
ping download.visualstudio.microsoft.com
(3)若没有丢包,且往返时间很小,则说明我们的hosts文件生效。
在这里插入图片描述
经过上述操作,VS2019的下载速度会非常快。
安装流程完全按照”https://mp.weixin.qq.com/s/Pc5U7lBrhUq06MYj6hSJWw“所提供的步骤来就行了。

2. 安装Intel API2024

  1. 先安装the Intel® oneAPI Base Toolkit:”https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html“
  2. 再安装the Intel® HPC Toolkit:”https://www.intel.com/content/www/us/en/developer/tools/oneapi/hpc-toolkit-download.html“
  3. 安装步骤很简单,修改安装路径,其他默认即可。
  4. 最后打开Visual Studio 2019,看到Fortran一项即说明安装配置成果。
    在这里插入图片描述

3. 配置xml文件文件

然后,需要添加intel_fortran_24_vs2019.xml文件。由于我用的是Intel API2024+visual studio 2019,所以在我的MATLAB安装路径”G:\MATLAB R2023b\bin\win64\mexopts“下需要有intel_fortran_24_vs2019.xml文件,这个文件matlab2023b是没有的。可将下面代码复制粘贴到记事本,再重命名为”intel_fortran_24_vs2019.xml“即可:

<?xml version="1.0" encoding="UTF-8" ?>
<configName="Intel oneAPI 2024 for Fortran with Microsoft Visual Studio 2019"ShortName="INTELF24MSVS2019"Manufacturer="Intel"Version="24.0"Language="FORTRAN"Priority="X"Location="$FORTRANROOT" ><DetailsCompilerExecutable="$COMPILER"CompilerDefines="$COMPDEFINES"CompilerFlags="$COMPFLAGS"OptimizationFlags="$OPTIMFLAGS"DebugFlags="$DEBUGFLAGS"IncludeFlags="$INCLUDE"LinkerExecutable="$LINKER"LinkerFlags="$LINKFLAGS"LinkerLibraries="$LINKLIBS"LinkerDebugFlags="$LINKDEBUGFLAGS"LinkerOptimizationFlags="$LINKOPTIMFLAGS"CommandLineShell="$FORTRANROOT\env\vars.bat "CommandLineShellArg="intel64"CompilerDefineFormatter="/D%s"LinkerLibrarySwitchFormatter="lib%s.lib;%s.lib"LinkerPathFormatter="/LIBPATH:%s"LibrarySearchPath="$$LIB;$$LIBPATH;$$PATH;$$INCLUDE;$MATLABROOT\extern\lib\$ARCH\microsoft"/><!-- Switch guide: http://msdn.microsoft.com/en-us/library/fwkeyyhe(v=vs.71).aspx --><varsCMDLINE100="$COMPILER /c $COMPFLAGS $OPTIM $SRC /Fo$OBJ"CMDLINE200="$LINKER $LINKFLAGS $LINKTYPE $LINKOPTIM $LINKEXPORTVER $OBJS $LINKLIBS /out:$EXE"CMDLINE300="del $EXP $LIB $ILK"
FORTRANROOT="$ONE_API_ROOT/compiler/$ONE_API_VERSION"
COMPILER="ifx.exe"
COMPFLAGS="/nologo /fpp /fixed /MD /fp:source /assume:bscc $INCLUDE  $COMPDEFINES"
COMPDEFINES="/DMATLAB_MEX_FILE"
MATLABMEX=" /DMATLAB_MEX_FILE"
OPTIMFLAGS="/O2 /DNDEBUG"
INCLUDE="-I&quot;$MATLABROOT\extern\include&quot;"
DEBUGFLAGS="/Z7"LINKER="link"
LINKFLAGS=" /nologo  /INCREMENTAL:NO"
LINKTYPE="/DLL"
LINKEXPORT="/EXPORT:MEXFUNCTION"
LINKEXPORTVER="/EXPORT:MEXFUNCTION /EXPORT:MEXFILEREQUIREDAPIVERSION"
LINKLIBS="/LIBPATH:&quot;$MATLABROOT\extern\lib\$ARCH\microsoft&quot; libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"
LINKDEBUGFLAGS="/debug /PDB:&quot;$TEMPNAME$LDEXT.pdb&quot;"
LINKOPTIMFLAGS=""OBJEXT=".obj"
LDEXT=".mexw64"
SETENV="set COMPILER=$COMPILERset COMPFLAGS=/c $COMPFLAGS $COMPDEFINES $MATLABMEXset OPTIMFLAGS=$OPTIMFLAGSset DEBUGFLAGS=$DEBUGFLAGSset LINKER=$LINKERset LINKFLAGS=$LINKFLAGS /export:%ENTRYPOINT% $LINKTYPE $LINKLIBS $LINKEXPORTset LINKDEBUGFLAGS=/debug /PDB:&quot;%OUTDIR%%MEX_NAME%$LDEXT.pdb&quot;set NAME_OUTPUT=/out:&quot;%OUTDIR%%MEX_NAME%%MEX_EXT%&quot;"
/><client><engineCMDLINE300="if exist $ILK del $ILK"LINKLIBS="$LINKLIBS libeng.lib"LINKEXPORT="/subsystem:console"LINKEXPORTVER="/subsystem:console"LDEXT=".exe"LINKTYPE=""MATLABMEX=""/></client><locationFinder><ONE_API_ROOT><envVarExists name="ONEAPI_ROOT" /></ONE_API_ROOT><ONE_API_VERSION><and><envVarExists name="ONEAPI_ROOT" /><cmdReturns name ="echo off &amp; (for /f %a IN ('dir &quot;$$\compiler\2024*&quot; /b /ad /on') do (@if exist &quot;$$\compiler\%a\bin\ifx.exe&quot; set &quot;oneapiVer=%a&quot;)) &amp; (@if defined oneapiVer call echo %oneapiVer%)"/></and></ONE_API_VERSION><VCROOT><or><and><envVarExists name="ProgramFiles(x86)" /><fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /><cmdReturns name="&quot;$$\\vswhere.exe&quot; -version &quot;[16.0,17.0)&quot; -products Microsoft.VisualStudio.Product.Enterprise -property installationPath -format value" /><cmdReturns name="set &quot;vcroot=$$&quot;&amp;for /f &quot;delims= &quot; %a in ('type &quot;$$\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt&quot;') do @if exist &quot;$$\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe&quot; call echo %vcroot%" /></and><and><envVarExists name="ProgramFiles(x86)" /><fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /><cmdReturns name="&quot;$$\\vswhere.exe&quot; -version &quot;[16.0,17.0)&quot; -products Microsoft.VisualStudio.Product.Professional -property installationPath -format value" /><cmdReturns name="set &quot;vcroot=$$&quot;&amp;for /f &quot;delims= &quot; %a in ('type &quot;$$\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt&quot;') do @if exist &quot;$$\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe&quot; call echo %vcroot%" /></and><and><envVarExists name="ProgramFiles(x86)" /><fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /><cmdReturns name="&quot;$$\\vswhere.exe&quot; -version &quot;[16.0,17.0)&quot; -products Microsoft.VisualStudio.Product.Community -property installationPath -format value" /><cmdReturns name="set &quot;vcroot=$$&quot;&amp;for /f &quot;delims= &quot; %a in ('type &quot;$$\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt&quot;') do @if exist &quot;$$\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe&quot; call echo %vcroot%" /></and></or></VCROOT><SDKROOT><or><hklmExists path="SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0" name="InstallationFolder" /><hkcuExists path="SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0" name="InstallationFolder" /><hklmExists path="SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0" name="InstallationFolder" /><hkcuExists path="SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0" name="InstallationFolder" /></or></SDKROOT><VSINSTALLDIR><or><and><envVarExists name="ProgramFiles(x86)" /><fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /><cmdReturns name="&quot;$$\\vswhere.exe&quot; -version &quot;[16.0,17.0)&quot; -products Microsoft.VisualStudio.Product.Enterprise -property installationPath -format value" /></and><and><envVarExists name="ProgramFiles(x86)" /><fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /><cmdReturns name="&quot;$$\\vswhere.exe&quot; -version &quot;[16.0,17.0)&quot; -products Microsoft.VisualStudio.Product.Professional -property installationPath -format value" /></and><and><envVarExists name="ProgramFiles(x86)" /><fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /><cmdReturns name="&quot;$$\\vswhere.exe&quot; -version &quot;[16.0,17.0)&quot; -products Microsoft.VisualStudio.Product.Community -property installationPath -format value" /></and></or></VSINSTALLDIR><VCINSTALLDIR><or><and><envVarExists name="ProgramFiles(x86)" /><fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /><cmdReturns name="&quot;$$\\vswhere.exe&quot; -version &quot;[16.0,17.0)&quot; -products Microsoft.VisualStudio.Product.Enterprise -property installationPath -format value" /><cmdReturns name="set &quot;vcroot=$$&quot;&amp;for /f &quot;delims= &quot; %a in ('type &quot;$$\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt&quot;') do @if exist &quot;$$\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe&quot; call echo %vcroot%\VC\Tools\MSVC\%a" /></and><and><envVarExists name="ProgramFiles(x86)" /><fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /><cmdReturns name="&quot;$$\\vswhere.exe&quot; -version &quot;[16.0,17.0)&quot; -products Microsoft.VisualStudio.Product.Professional -property installationPath -format value" /><cmdReturns name="set &quot;vcroot=$$&quot;&amp;for /f &quot;delims= &quot; %a in ('type &quot;$$\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt&quot;') do @if exist &quot;$$\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe&quot; call echo %vcroot%\VC\Tools\MSVC\%a" /></and><and><envVarExists name="ProgramFiles(x86)" /><fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /><cmdReturns name="&quot;$$\\vswhere.exe&quot; -version &quot;[16.0,17.0)&quot; -products Microsoft.VisualStudio.Product.Community -property installationPath -format value" /><cmdReturns name="set &quot;vcroot=$$&quot;&amp;for /f &quot;delims= &quot; %a in ('type &quot;$$\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt&quot;') do @if exist &quot;$$\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe&quot; call echo %vcroot%\VC\Tools\MSVC\%a" /></and></or></VCINSTALLDIR><VCVARSALLDIR><or><and><envVarExists name="ProgramFiles(x86)" /><fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /><cmdReturns name="&quot;$$\\vswhere.exe&quot; -version &quot;[16.0,17.0)&quot; -products Microsoft.VisualStudio.Product.Enterprise -property installationPath -format value" /><fileExists name="$$\VC\Auxiliary\Build\vcvarsall.bat" /><dirExists name="$$"/></and><and><envVarExists name="ProgramFiles(x86)" /><fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /><cmdReturns name="&quot;$$\\vswhere.exe&quot; -version &quot;[16.0,17.0)&quot; -products Microsoft.VisualStudio.Product.Professional -property installationPath -format value" /><fileExists name="$$\VC\Auxiliary\Build\vcvarsall.bat" /><dirExists name="$$"/></and><and><envVarExists name="ProgramFiles(x86)" /><fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /><cmdReturns name="&quot;$$\\vswhere.exe&quot; -version &quot;[16.0,17.0)&quot; -products Microsoft.VisualStudio.Product.Community -property installationPath -format value" /><fileExists name="$$\VC\Auxiliary\Build\vcvarsall.bat" /><dirExists name="$$"/></and></or></VCVARSALLDIR><KITSROOT><or><hklmExists path="SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /><hkcuExists path="SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /><hklmExists path="SOFTWARE\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /><hkcuExists path="SOFTWARE\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /></or></KITSROOT><SDKVERSION><and><or><hklmExists path="SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /><hkcuExists path="SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /><hklmExists path="SOFTWARE\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /><hkcuExists path="SOFTWARE\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /></or><!-- For each folder inside '<KITSROOT>\include' check for 'ucrt' and if exists return that folder name --><cmdReturns name="echo off&amp;set &quot;sdkversion=&quot;&amp;(for /f %a IN ('dir &quot;$$\include\&quot; /b /ad-h /on') do ( @if exist &quot;$$\include\%a\ucrt\&quot; set &quot;sdkversion=%a&quot; ))&amp;call echo %sdkversion%" /></and></SDKVERSION></locationFinder><envPATH="$FORTRANROOT\bin;$VCINSTALLDIR\bin\HostX64\x64\;$VCROOT\Common7\IDE\VC\vcpackages;$VCROOT\Common7\IDE;$VCROOT\Common7\Tools;$SDKROOT\Bin\$SDKVERSION\x64;$SDKROOT\Bin\$SDKVERSION\x86;$SDKROOT\Bin\x64;$SDKROOT\Bin\x86;"INCLUDE="$FORTRANROOT\include;$VCINSTALLDIR\include;$VCINSTALLDIR\atlmfc\include;$KITSROOT\include\$SDKVERSION\ucrt;$KITSROOT\include\$SDKVERSION\shared;$KITSROOT\include\$SDKVERSION\um;$KITSROOT\include\$SDKVERSION\winrt;$MATLABROOT\extern\include"LIB="$FORTRANROOT\lib;$VCINSTALLDIR\lib\x64;$VCINSTALLDIR\atlmfc\lib\x64;$KITSROOT\Lib\$SDKVERSION\ucrt\x64;$KITSROOT\lib\$SDKVERSION\um\x64;$MATLABROOT\lib\$ARCH"LIBPATH="$FORTRANROOT\lib;$VCINSTALLDIR\lib\x64;$VCINSTALLDIR\atlmfc\lib\x64"/>
</config>

4. 设置环境变量

变量值是安装oneAPI地址
在这里插入图片描述

5. MATLAB编译Fortran

输入命令:mex -setup FORTRAN
输入编译的Fortran代码:mex ‘DC3D0wrapper.F’
在这里插入图片描述
在文件夹中生成了一个后缀”.mexw64“的文件,即表示编译成功!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/403375.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

在亚马逊云科技上部署开源大模型并利用RAG和LangChain开发生成式AI应用

项目简介&#xff1a; 小李哥将继续每天介绍一个基于亚马逊云科技AWS云计算平台的全球前沿AI技术解决方案&#xff0c;帮助大家快速了解国际上最热门的云计算平台亚马逊云科技AWS AI最佳实践&#xff0c;并应用到自己的日常工作里。 本次介绍的是如何在亚马逊云科技上利用Sag…

IDEA2023版本创建mavenWeb项目及maven的相关配置

在使用idea创建maven项目之前&#xff0c;首先要确保本地已经下载并配置好maven的环境变量&#xff0c;可以参考我主页的maven下载及环境变量配置篇。 接下来首先介绍我们需要对maven安装目录文件进行的修改介绍。 maven功能配置 我们需要需改 maven/conf/settings.xml 配置…

中间件|day1.Redis

Redis 定义 Redis 是一个开源&#xff08;BSD许可&#xff09;的&#xff0c;内存中的数据结构存储系统&#xff0c;它可以用作数据库、缓存和消息中间件。 它支持多种类型的数据结构&#xff0c;如 字符串&#xff08;strings&#xff09;&#xff0c; 散列&#xff08;hash…

构建一个Markdown编辑器:Fyne综合案例

在本文中&#xff0c;我们将通过一个完整的案例来介绍如何使用Go语言的Fyne库来构建一个简单的Markdown编辑器。Fyne是一个易于使用的库&#xff0c;它允许开发者使用Go语言来创建跨平台的GUI应用程序。 1. 项目结构 首先&#xff0c;我们需要创建一个Go项目&#xff0c;并引…

Linux进程间通信——SystemV共享内存

文章目录 System V共享内存创建内存共享释放共享内存命令行shmctlshmatshmdt System V共享内存 System V是一种进程间通信的标准&#xff0c;在这种标准之下&#xff0c;本地通信的方式一般由三种&#xff0c;内存共享、消息队列、信号量 这里我们主要介绍共享内存 创建内存…

Shell参考 - Linux Shell 训练营

出品方<Linux.cn & 阿里云开发者学堂> 一&#xff0c;Linux 可以划分为以下四个部分&#xff1a; 1. 应用软件 2. 窗口管理软件 Unity Gnome KDE 3. GNU 系统工具链 Software- GNU Project - Free Software Foundation 4. Linux 内核 二&#xff0c;什么是shell 1. L…

达梦数据库的系统视图v$database

达梦数据库的系统视图v$database 达梦数据库&#xff08;DM Database&#xff09;提供了多个系统视图&#xff0c;以便管理员能够监控和管理数据库的运行状态和性能。V$DATABASE 是其中一个关键系统视图&#xff0c;它包含有关数据库全局状态和配置的综合信息。 V$DATABASE 系…

Linux 软件编程学习第十五天

1.TCP粘包问题&#xff1a; TCP发送数据是连续的&#xff0c;两次发送的数据可能粘连成一包被接收到 1.解决粘包问题方法&#xff1a; 1.接收指定长度&#xff1a;&#xff08;不稳定&#xff09; 发送5个字节 接收5个字节 2.睡眠&#x…

Java | Leetcode Java题解之第342题4的幂

题目: 题解&#xff1a; class Solution {public boolean isPowerOfFour(int n) {return n > 0 && (n & (n - 1)) 0 && n % 3 1;} }

【数据结构算法经典题目刨析(c语言)】使用数组实现循环队列(图文详解)

&#x1f493; 博客主页&#xff1a;C-SDN花园GGbond ⏩ 文章专栏&#xff1a;数据结构经典题目刨析(c语言) 目录 一.题目描述 二.解题思路 1.循环队列的结构定义 2.队列初始化 3.判空 4.判满 5.入队列 6.出队列 7.取队首元素 8.取队尾元素 三.完整代码实…

接入谷歌支付配置

1.谷歌云创建项目 网址&#xff1a;https://console.cloud.google.com/ 按照步骤创建即可 创建好后选择项目&#xff0c;转到项目设置 选择服务账户&#xff0c;选择创建新的服务账户 名称输入好后访问权限吗账号权限都可以不用填写&#xff0c;默认就好了 然后点击电子邮…

企业高性能web服务器

目录 一.Web 服务基础介绍 1.1 Web 服务介绍 1.2.1 Apache 经典的 Web 服务端 1.2.1.1 Apache prefork 模型 1.2.1.2 Apache worker 模型 1.2.1.3 Apache event模型 1.2.2 Nginx-高性能的 Web 服务端 1.2.3 影响用户体验的因素 1.2.4 服务端 I/O 流程 1.2.4.1 磁盘 I…

【详细】linux 打包QT程序

【详细】linux 打包QT程序 一. 安装linuxdeployqt1.1 下载linuxdeployqt源码并修改如下 二. 安装patchelf三. 打包appimage四. 打包成 Debian包4.1 control文件内容4.2 postinst文件内容4.3 postrm文件内容4.4 打包命令4.4 安装命令4.5 卸载命令 一. 安装linuxdeployqt 下载地…

Gin框架接入Prometheus,grafana辅助pprof检测内存泄露

prometheus与grafana的安装 grom接入Prometheus,grafana-CSDN博客 Prometheus 动态加载 我们想给Prometheus新增监听任务新增ginapp项目只需要在原来的配置文件下面新增ginapp相关metric 在docker compose文件下面新增 执行 docker-compose up -d curl -X POST http://lo…

复现dom破坏案例和靶场

文章目录 靶场网址第一个实验步骤和原理(代码为示例要根据自己的实验修改) 第二个实验步骤和原理(代码为示例要根据自己的实验修改) 靶场网址 注册后点击 第一个实验 此实验室包含一个 DOM 破坏漏洞。注释功能允许“安全”HTML。为了解决这个实验&#xff0c;请构造一个 HT…

依赖注入+中央事件总线:Vue 3组件通信新玩法

​&#x1f308;个人主页&#xff1a;前端青山 &#x1f525;系列专栏&#xff1a;Vue篇 &#x1f516;人终将被年少不可得之物困其一生 依旧青山,本期给大家带来Vue篇专栏内容:Vue-依赖注入-中央事件总线 目录 中央事件总线使用 依赖注入使用 总结 中央事件总线 依赖注入…

【TiDB】09-修改tidb客户端访问密码

目录 1、修改配置文件 2、停止tidb-server 3、以root方式启动脚本 4、修改密码 5、停止脚本重启服务 1、修改配置文件 进入tidb-server默认部署位置 #切换tidb账号 su tidb# 进入tidb-server部署路径 cd /tidb-deploy/tidb-4000# 修改配置 vim ./conf/tidb.toml添加内容…

Datawhale AI 夏令营 第四期 AIGC Task3

活动简介 活动链接&#xff1a;Datawhale AI 夏令营&#xff08;第四期&#xff09; 以及AIGC里面的本次任务说明&#xff1a;Task 3 进阶上分-实战优化 这次任务呢&#xff0c;主要是对知识的一个讲解&#xff0c;包括ComfyUI工具的使用啊&#xff0c;以及LoRA的原理啊&…

学习记录第三十天

管道&#xff1a; 无名管道&#xff1a;只能用于亲缘关系进程之间的通信&#xff1a; 有名管道&#xff1a;是一种特殊的文件&#xff0c;存在于内存中&#xff0c;在系统中有对应的名称&#xff0c;文件大小为0字节&#xff1b; 编程&#xff1a; Linux系统中&#xff0c;…

Deepin-获取屏幕缩放比例

Deepin-获取屏幕缩放比例 一、概述二、实现代码 一、概述 环境&#xff1a;UOS、Deepin 我的目的是为了获取屏幕的缩放比例值&#xff0c;就是获取如下的值 我们可以去读取当前的环境变量值&#xff0c;在Qt Creator中可以看到这个值 二、实现代码 相关的Qt接口如下&…