<?xml version="1.0" encoding="utf-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><title>Play Together</title><link>https://175.es/blog/</link><description>The Best Vpn</description><item><title>PCB布线布局基本规则</title><link>https://175.es/blog/post/664.html</link><description>&lt;section class=&quot;view-title&quot; style=&quot;margin: 0px; padding: 48px 0px 0px; border: 0px; font-size: 12px; outline: none; background: rgb(246, 246, 246); text-align: center; color: rgb(152, 152, 152); font-family: &amp;quot;Microsoft YaHei New&amp;quot;, &amp;quot;Microsoft Yahei&amp;quot;, 微软雅黑, &amp;quot;Hiragino Sans GB&amp;quot;, 冬青黑体, Arial, Helvetica, SimHei, 黑体, STXihei, 华文细黑, sans-serif; text-wrap: wrap;&quot;&gt;&lt;h1 class=&quot;addtt-title&quot; style=&quot;margin: 0px 0px 6px; padding: 0px; border: 0px; font-size: 22px; outline: none; color: rgb(51, 51, 51); font-weight: normal; text-align: left;&quot;&gt;PCB布线布局基本规则&lt;/h1&gt;&lt;div class=&quot;view-share&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; display: flex; justify-content: center; align-items: center;&quot;&gt;&lt;time style=&quot;margin: 0px 12px 0px 0px; padding: 0px; border: 0px; font-size: 14px; outline: none; display: block; color: rgb(102, 102, 102);&quot;&gt;&lt;br/&gt;&lt;/time&gt;&lt;/div&gt;&lt;/section&gt;&lt;p&gt;&lt;/p&gt;&lt;section class=&quot;view-fix&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; font-size: 12px; outline: none; background: rgb(246, 246, 246); color: rgb(152, 152, 152); font-family: &amp;quot;Microsoft YaHei New&amp;quot;, &amp;quot;Microsoft Yahei&amp;quot;, 微软雅黑, &amp;quot;Hiragino Sans GB&amp;quot;, 冬青黑体, Arial, Helvetica, SimHei, 黑体, STXihei, 华文细黑, sans-serif; text-wrap: wrap;&quot;&gt;&lt;section class=&quot;view-text&quot; style=&quot;margin: auto; padding: 34px 0px 66px; border: 0px; font-size: 14px; outline: none; width: 800px; color: rgb(102, 102, 102);&quot;&gt;&lt;h2 style=&quot;margin: 0px; padding: 0px; border: 0px; font-size: 14px; outline: none; line-height: 3em; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　&lt;/span&gt;&lt;strong style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;元件布局基本规则&lt;/span&gt;&lt;/strong&gt;&lt;/h2&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　1. 按电路模块进行布局，实现同一功能的相关电路称为一个模块，电路模块中的元件应采用就近集中原则，同时数字电路和模拟电路分开。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　2.遵照“先大后小，先难后易”等的布置原则，即重要的单元电路、核心元器件应当优先布局。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　3.布局中应参考原理框图，根据单板的主信号流向规律安排主要元器件。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　4.布局应该尽量满足以下要求：总的连线尽可能短，关键信号线最短；高电压、大电流信号与小电流、低电压的弱信号完全分开；模拟信号与数字信号分开；高频信号与低频信号分开；高频元器件的间隔要充分。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　5.相同结构电路部分，尽可能采用“对称式”标准布局。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　6.器件布局栅格的设置，一般IC器件布局时，栅格应为50-100mil、小型表面安装器件，如表面贴装元件布局时，栅格设置应不少于25mil.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　7.同类型插装元器件在X或Y方向上应朝一个方向防止同一种类型的有极性分立元件也要力争在X或Y方向上保持一致，便于生产和检验。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　8.IC去耦电容的布局要尽量靠近IC的电源管脚，并使之与电源和地之间形成的回路最短。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　9.元件布局时，应适当考虑使用同一种电源的器件尽量放在一起，以便于将来的电源分割。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　10.用于阻抗匹配目的阻容器件的布局，要根据其属性合理布置。串联匹配电阻的布局要靠近该信号的驱动端，距离一般不超过500mil。匹配电阻、电容的布局一定要分清信号的源端和终端，对于多负载的终端匹配一定要在信号的最远端匹配。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　11.表面贴装器件（SMD）相互间距离要大于0.7mm。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　12.表面贴装器件焊盘外侧同相邻插件外形边缘距离要大于2mm。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　13.定位孔、标准孔等非安装孔周围1.27mm 内不得贴装元、器件，螺钉等安装孔周围3.5mm（对于M2.5）、4mm（对于M3）内不得贴装元器件。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　14. 卧装电阻、电感（插件）、电解电容等元件的下方避免布过孔，以免波峰焊后过孔与元件壳体短路。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　15. 元器件的外侧距板边的距离为5mm。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　16.BGA与相邻元件的距离&amp;gt;5mm。有压接件的PCB，压接的接插件周围5mm内不能有插装元器件，在焊接面其周围5mm内也不能有贴装元器件。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　17. 金属壳体元器件和金属件（屏蔽盒等）不能与其它元器件相碰，不能紧贴印制线、焊盘，其间距应大于2mm。定位孔、紧固件安装孔、椭圆孔及板中其它方孔外侧距板边的尺寸大于3mm。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　18. 发热元件不能紧邻导线和热敏元件；高热器件要均衡分布。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　19. 电源插座要尽量布置在印制板的四周，电源插座与其相连的汇流条接线端应布置在同侧。特别应注意不要把电源插座及其它焊接连接器布置在连接器之间，以利于这些插座、连接器的焊接及电源线缆设计和扎线。电源插座及焊接连接器的布置间距应考虑方便电源插头的插拔。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　20.贴片焊盘上不能有通孔，以免焊膏流失造成元件虚焊。重要信号线不准从插座脚间穿过。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　21.贴片单边对齐，字符方向一致，封装方向一致。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　22.有极性的器件在以同一板上的极性标示方向尽量保持一致。&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;margin: 0px; padding: 0px; border: 0px; font-size: 14px; outline: none; line-height: 3em; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　&lt;/span&gt;&lt;strong style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;PCB布线规则&lt;/span&gt;&lt;/strong&gt;&lt;/h2&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　1、画定布线区域距PCB板边≤1mm的区域内，以及安装孔周围1mm内，禁止布线。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　2、电源线尽可能的宽，不应低于18mil；信号线宽不应低于12mil；cpu入出线不应低于10mil（或8mil）；线间距不低于10mil。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　3、正常过孔不低于30mil。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　4、 注意电源线与地线应尽可能呈放射状，以及信号线不能出现回环走线。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　&lt;strong style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none;&quot;&gt;5、地线回路规则：&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　环路最小规则，即信号线与其回路构成的环面积要尽可能小，环面积越小，对外的辐射越少，接收外界的干扰也越小。实例如下图所示：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; text-align: left; line-height: 3em; margin-bottom: 0px !important;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; font-family: 宋体, simsun; color: #000000;&quot;&gt;&lt;img data-width=&quot;310&quot; data-height=&quot;191&quot; src=&quot;https://www.ebyte.com/Uploadfiles/Picture/2020-1-9/2020191540291035.png&quot; title=&quot;PCB布线布局基本规则&quot; alt=&quot;PCB布线布局基本规则&quot; width=&quot;310&quot; height=&quot;191&quot; border=&quot;0&quot; hspace=&quot;0&quot; vspace=&quot;0&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; width: 310px; height: 191px; max-width: 100%;&quot;/&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　&lt;strong style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none;&quot;&gt;6、串扰控制&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　串扰是指PCB上不同网络之间因较长的平行布线引起的相互干扰，主要是由于平行线间的分布电容和分布电感的作用。克服串扰的主要措施是：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　加大平行布线的间距，遵循3W规则。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　在平行线间插入接地的隔离线。减小布线层与地平面的距离。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　&lt;strong style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none;&quot;&gt;7、走线的方向控制规则：&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　相邻层的走线方向成正交结构。避免将不同的信号线在相邻层走成同一方向，以减少不必要的层间串扰；当由于板结构限制年已避免出现该情况，特别是信号速率较高时，应考虑用地平面隔离各布线层，用地信号线隔离各信号线。作为电路的输入及输出用的印制导线应尽量避免相邻平行，以免发生回授，在这些导线之间最好加接地线。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　&lt;strong style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none;&quot;&gt;　8、走线的开环检查规则：&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　一般不允许出现一端浮空的布线，主要是为了避免产生“天线效应”，减少不必要的干扰辐射和接收，否则可能带来不可预知的结果。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; text-align: left; line-height: 3em; margin-bottom: 0px !important;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; font-family: 宋体, simsun; color: #000000;&quot;&gt;&lt;img data-width=&quot;241&quot; data-height=&quot;116&quot; src=&quot;https://www.ebyte.com/Uploadfiles/Picture/2020-1-9/202019154126753.png&quot; title=&quot;PCB布线布局基本规则&quot; alt=&quot;PCB布线布局基本规则&quot; width=&quot;241&quot; height=&quot;116&quot; border=&quot;0&quot; hspace=&quot;0&quot; vspace=&quot;0&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; width: 241px; height: 116px; max-width: 100%;&quot;/&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　9、阻抗匹配检查规则：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　同一网络的布线宽度应保持一致，线宽的变化会造成线路特性阻抗的不均匀，当传输的速度较高时会产生反射，在设计中应该尽量避免这种情况。在某些条件下，如接插件引出线，BGA封装的引出线类似的结构时，可能无法避免线宽的变化，应该尽量减少中间不一致部分的有效长度。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　10、走线闭环检查规则:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　防止信号线在不同层之间形成自环。在多层板设计中容易发生此类问题，自环将引起辐射干扰。如下图所示：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; text-align: left; line-height: 3em; margin-bottom: 0px !important;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; font-family: 宋体, simsun; color: #000000;&quot;&gt;&lt;img data-width=&quot;297&quot; data-height=&quot;146&quot; src=&quot;https://www.ebyte.com/Uploadfiles/Picture/2020-1-9/2020191541266817.png&quot; title=&quot;PCB布线布局基本规则&quot; alt=&quot;PCB布线布局基本规则&quot; width=&quot;297&quot; height=&quot;146&quot; border=&quot;0&quot; hspace=&quot;0&quot; vspace=&quot;0&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; width: 297px; height: 146px; max-width: 100%;&quot;/&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　11、走线的分枝长度控制规则：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　尽量控制分枝的长度，一般的要求是Tdelay&amp;lt;=Trise/20。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; text-align: left; line-height: 3em; margin-bottom: 0px !important;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; font-family: 宋体, simsun; color: #000000;&quot;&gt;&lt;img data-width=&quot;318&quot; data-height=&quot;198&quot; src=&quot;https://www.ebyte.com/Uploadfiles/Picture/2020-1-9/2020191541509832.png&quot; title=&quot;PCB布线布局基本规则&quot; alt=&quot;PCB布线布局基本规则&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; max-width: 100%; width: auto !important; height: auto !important;&quot;/&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　12、走线的谐振规则：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　主要针对高频信号设计而言，即布线长度不得与其波长成整数倍关系，以免产生谐振现象。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　13、走线长度控制规则：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　即短线规则，在设计时应该尽量让布线长度尽量短，以减少由于走线过长带来的干扰问题，特别是一些重要信号线，如时钟线，务必将其振荡器放在离器件很近的地方。对驱动多个器件的情况，应根据具体情况决定采用何种网络拓扑结构。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; text-align: left; line-height: 3em; margin-bottom: 0px !important;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; font-family: 宋体, simsun; color: #000000;&quot;&gt;&lt;img data-width=&quot;341&quot; data-height=&quot;107&quot; src=&quot;https://www.ebyte.com/Uploadfiles/Picture/2020-1-9/202019154299679.png&quot; title=&quot;PCB布线布局基本规则&quot; alt=&quot;PCB布线布局基本规则&quot; width=&quot;341&quot; height=&quot;107&quot; border=&quot;0&quot; hspace=&quot;0&quot; vspace=&quot;0&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; width: 341px; height: 107px; max-width: 100%;&quot;/&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　14、倒角规则：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　PCB设计中应避免产生锐角和直角，产生不必要的辐射，同时工艺性能也不好。在布线中尽量采用135度拐角，如下图所示：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; text-align: left; line-height: 3em; margin-bottom: 0px !important;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; font-family: 宋体, simsun; color: #000000;&quot;&gt;&lt;img data-width=&quot;343&quot; data-height=&quot;108&quot; src=&quot;https://www.ebyte.com/Uploadfiles/Picture/2020-1-9/2020191542363846.png&quot; title=&quot;PCB布线布局基本规则&quot; alt=&quot;PCB布线布局基本规则&quot; width=&quot;343&quot; height=&quot;108&quot; border=&quot;0&quot; hspace=&quot;0&quot; vspace=&quot;0&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; width: 343px; height: 108px; max-width: 100%;&quot;/&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　15、器件布局分区/分层规则：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　主要是为了防止不同工作频率的模块之间的互相干扰，同时尽量缩短高频部分的布线长度。通常将高频的部分布设在接口部分以减少布线长度。同时还要考虑到高/低频部分地平面的分割问题，通常采用将二者的地分割，再在接口处单点相接。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　对混合电路，也有将模拟与数字电路分布布置在印制板的两面，分别使用不同的层布线，中间用地层隔离的方式。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　16、孤立铜区控制规则：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　孤立铜区的出现，将带来一些不可预知的问题，因此将孤立铜区与别的信号相接，有助于改善信号质量，通常是将孤立铜区接地或删除。在实际的制作中，PCB厂家将一些板的空置部分增加了一些铜箔，主要是为了方便印制板加工，同时对防止印制板翘曲也有一定的作用。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　17、电源与地线层的完整性规则：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　对于导通孔密集的区域，要注意避免孔在电源和地层的挖空区域相互连接，形成对平面层的分割，从而破坏平面层的完整性，并进而导致信号线在地层的回路面积增大。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　18、重叠电源与地线层规划：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　不同电源层在空间上要避免重叠。主要是为了减少不同电源之间的干扰，特别是一些电压相差很大的电源之间，电源平面的重叠问题一定要设法避免，难以避免时可考虑中间隔底层。在不同信号层间进行供电的电源总线遵循这一规则，即尽量避免重叠。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　19、3W规则：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　为了减少线间串扰，应保证导线间距足够大，当导线中心间距不少于3倍线宽时，则可保持70%的电场不互相串扰，如要达到98%的电场不互相干扰，可使用10W间距。在布线密度较低时，信号线的间距可适当地加大，对高、低电平悬殊的信号线应尽可能地短且加大间距。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; text-align: left; line-height: 3em; margin-bottom: 0px !important;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; font-family: 宋体, simsun; color: #000000;&quot;&gt;&lt;img data-width=&quot;289&quot; data-height=&quot;119&quot; src=&quot;https://www.ebyte.com/Uploadfiles/Picture/2020-1-9/2020191542599262.png&quot; title=&quot;PCB布线布局基本规则&quot; alt=&quot;PCB布线布局基本规则&quot; width=&quot;289&quot; height=&quot;119&quot; border=&quot;0&quot; hspace=&quot;0&quot; vspace=&quot;0&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; width: 289px; height: 119px; max-width: 100%;&quot;/&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　20. 印制导线的宽度：导线宽度应以能满足电气性能要求而又便于生产为宜，它的最小值以承受的电流大小而定，但最小不宜小于0.2mm，在高密度、高精度的印制线路中，导线宽度和间距一般可取0.3mm；导线宽度在大电流情况下还要考虑其温升，单面板实验表明，当铜箔厚度为50μm、导线宽度1～1.5mm、通过电流2A时，温升很小，因此，一般选用1～1.5mm宽度导线就可能满足设计要求而不致引起温升；印制导线的公共地线应尽可能地粗，可能的话，使用大于2～3mm的线条，这点在带有微处理器的电路中尤为重要，因为当地线过细时，由于流过的电流的变化，地电位变动，微处理器定时信号的电平不稳，会使噪声容限劣化；在DIP封装的IC脚间走线，可应用10－10与12－12原则，即当两脚间通过2根线时，焊盘直径可设为50mil、线宽与线距都为10mil，当两脚间只通过1根线时，焊盘直径可设为64mil、线宽与线距都为12mil。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　21. 印制导线的屏蔽与接地：印制导线的公共地线，应尽量布置在印制线路板的边缘部分。在印制线路板上应尽可能多地保留铜箔做地线，这样得到的屏蔽效果，比一长条地线要好，传输线特性和屏蔽作用将得到改善，另外起到了减小分布电容的作用。印制导线的公共地线最好形成环路或网状，这是因为当在同一块板上有许多集成电路，特别是有耗电多的元件时，由于图形上的限制产生了接地电位差，从而引起噪声容限的降低，当做成回路时，接地电位差减小。另外，接地和电源的图形尽可能要与数据的流动方向平行，这是抑制噪声能力增强的秘诀；多层印制线路板可采取其中若干层作屏蔽层，电源层、地线层均可视为屏蔽层，一般地线层和电源层设计在多层印制线路板的内层，信号线设计在内层和外层。&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;margin: 0px; padding: 0px; border: 0px; font-size: 14px; outline: none; line-height: 3em; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; font-size: 16px; outline: none;&quot;&gt;PCB&lt;/span&gt;&lt;/span&gt;&lt;strong style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; font-size: 16px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;板的布局：&lt;/span&gt;&lt;/strong&gt;&lt;/h2&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　1. 印制线路板上的元器件放置的通常顺序： 放置与结构有紧密配合的固定位置的元器件，如电源插座、指示灯、开关、连接件之类，这些器件放置好后用软件的LOCK 功能将其锁定，使之以后不会被误移动；&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　放置线路上的特殊元件和大的元器件，如发热元件、变压器、IC 等；&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　放置小器件。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　2.元器件离板边缘的距离：可能的话所有的元器件均放置在离板的边缘3mm以外或至少大于板厚，这是由于在大批量生产的流水线插件和进行波峰焊时，要提供给导轨槽使用，同时也为了防止由于外形加工引起边缘部分的缺损，如果印制线路板上元器件过多，不得已要超出3mm范围时，可以在板的边缘加上3mm的辅边，辅边开V 形槽，在生产时用手掰断即可。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; padding: 0px; border: 0px; outline: none; line-height: 3em; margin-bottom: 0px !important; text-align: left;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; outline: none; color: #000000; font-family: 微软雅黑, &amp;quot;microsoft yahei&amp;quot;;&quot;&gt;　　3.高低压之间的隔离：在许多印制线路板上同时有高压电路和低压电路，高压电路部分的元器件与低压部分要分隔开放置，隔离距离与要承受的耐压有关，通常情况下在2000kV时板上要距离2mm，在此之上以比例算还要加大，例如若要承受3000V的耐压测试，则高低压线路之间的距离应在3.5mm以上，许多情况下为避免爬电，还在印制线路板上的高低压之间开槽。&lt;/span&gt;&lt;/p&gt;&lt;/section&gt;&lt;/section&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Thu, 22 Feb 2024 11:34:21 +0800</pubDate></item><item><title>用于麦克风的 48V 幻象馈电电源</title><link>https://175.es/blog/post/663.html</link><description>&lt;p&gt;&lt;strong style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;介绍&lt;/strong&gt;&lt;span style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; background-color: #FFFFFF;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;由于一些令我费解的原因，网上很少有像样的 48V 幻象电源原理图。我所见过的那些要么非常粗糙，要么需要使用（自然）几乎无法获得的特殊变压器（或两者兼而有之）。相比之下，几乎任何地方都可以获得15-0-15V变压器，但遗憾的是，经过整流和滤波后没有足够的电压。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;幸运的是，这不是问题，因为倍压器电源将提供足够的电压，并且易于构建。这里的设计正是利用了这一点，并允许使用现成的变压器和其他低成本部件，从而提供具有极好的性能的电源。如图所示，没有短路保护，但幻象电源无论如何都不太可能短路，因此这不是限制。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;在网上可用的设计中，&lt;/span&gt;&lt;em&gt;P30&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;混频&lt;/span&gt;&lt;a href=&quot;https://sound-au.com/project30c.htm&quot; target=&quot;_blank&quot; style=&quot;color: rgb(0, 51, 153); text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;器中&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;em&gt;所示&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;的电源&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;（见图 3）与此处所示的设计类似，但没有那么精致。&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;https://sound-au.com/project30c.htm&quot; target=&quot;_blank&quot; style=&quot;color: rgb(0, 51, 153); text-decoration-line: none;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;幻象电源的另一个版本（相当常见）使用振荡器和电压倍增器来提供 48V（或左右）电源，但由于非常差的调节和固有的无法提供足够电流的原因，这些并不合适（IMO）。短路时可从标准幻象电路（使用 6.81k 电阻器）汲取的最大电流为 14mA。由于所有幻象供电系统都需要一定的工作电压（典型值约为 10V），因此每个供电电路消耗的最大实际电流约为 11mA。当然，有些人画的会比这个少。即使如此，倍压器电源也将难以提供如此微弱的电流，并且电池消耗也会很高。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;还有不少建议您可以使用低至 18V 的幻象供电（使用一对 9V 电池），但除非指定麦克风或 DI 盒（例如）在如此低的电压下工作，否则我不推荐它 - 动态余量将急剧减少，即使在相对较低的水平上，失真也会成为问题。有些设备根本无法工作。推荐的最低幻象电源电压是 30V，我认为对于大多数情况来说这个电压也太低了。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;该设计的输出电流在 48V 时的额定输出电流为 100mA，不过您可以得到更多 - 通过一些改变，200mA 并不是不合理的，即使如此，输出纹波预计也将远低于 1mV。仿真给出了 200mA 时峰峰值为 10uV 的数字，但这可能相当乐观。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;可能很少有人会需要建议的最大输出电流，因为 200mA 能够同时为多达 20 个幻象供电麦克风供电。我的建议是将最大电流保持在 100mA 或更低。&lt;/span&gt;&lt;/p&gt;&lt;hr style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;/&gt;&lt;p&gt;&lt;strong style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;描述&lt;/strong&gt;&lt;span style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; background-color: #FFFFFF;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;该电路如图 1 所示，如上所述，使用倍压整流器。二极管D1和D2是1N4004或类似的。从那里，一对电阻器为次级过滤器盖提供额外的平滑作用。 R3用于平衡C3和C4两端的电压，不能省略。&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;t-pic&quot; style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 11pt; font-weight: bold; text-align: center; white-space: normal;&quot;&gt;&lt;img data-width=&quot;658&quot; data-height=&quot;307&quot; src=&quot;https://sound-au.com/p96-f1.gif&quot; border=&quot;1&quot;/&gt;&lt;br/&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;图 1 - 48V 电源（P96A PCB）&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;所示的稳压器是在引入 3 端稳压器 IC 之前非常常见的拓扑结构，此处使用该拓扑是为了不需要高压稳压器。这些比标准版本更难获得，并且仍然需要额外的电路，因为 48V 版本尚未制造。虽然电路看起来很复杂，但构建起来非常容易（特别是使用 PCB 时）。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;齐纳二极管为参考电压，Q3（误差放大器）将 1/2 输出电压与齐纳电压进行比较。如果输出电压增加（例如，因为负载电流减少），Q3 会更加导通，从而消除 Q2（以及 Q1）的基极驱动，从而将输出电压降低至预设值。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;可以看出，没有进行任何调整，这意味着 48V 可能比额定电压稍高（或更低）。但这不是问题，所有幻象馈送麦克风都可以毫无问题地处理这种变化。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;负载调节比您预期的要好得多，满负载 (100mA) 和空载之间通常有 100mV 的变化。在200mA负载时，与空载电压相比，电压下降不到150mV。线路（输入）调节也相当好，+20% 和 -20% 输入电压、100mA 负载时输出变化小于 200mV。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;48V 稳压器的最大建议负载为 100mA，但如果您准备好为 Q1 提供足够好的散热器，它可以提供高达 200mA 的电流。最大交流电压为 30V，200mA 时 Q1 的功耗将接近 5W，因此高效的散热器至关重要。您还必须将 R1 和 R2 减小至 10 欧姆 1W，否则它们会在 200mA 电流下烧毁。对于长期可靠性而言，100mA 的最大电流要安全得多。如果允许最多 10 个幻象供电麦克风，每个麦克风消耗约 10mA 的典型电流，那么电流仍然只有 100mA，因此这几乎不是一个限制。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;交流输入电压是一个令人烦恼的问题。正常范围为 25 至 30V 交流电，但至少一位客户发现他们有 50V 绕组可用，非常适合幻象电源。不幸的是，如果将其应用到电路的输入（如图所示），电源将会出现故障，因为总电压约为 140V。&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;t-pic&quot; style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 11pt; font-weight: bold; text-align: center; white-space: normal;&quot;&gt;&lt;img data-width=&quot;658&quot; data-height=&quot;307&quot; src=&quot;https://sound-au.com/p96-f1a.gif&quot; border=&quot;1&quot;/&gt;&lt;br/&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;图 1A - 使用 50-60V AC 48V 输入的改进整流器&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;要使用单个 50-60V 绕组，只需用 100k 电阻器替换 D1 和 D2，连接 AC1 和 AC2 端子，然后应用外部桥式整流器的输出，如图所示。正极连接到 D1 位置的阴极连接（C1 的正极端子），负极连接到 D2 连接的阳极（C2 的负极端子）。外部电桥可以在一小块 Veroboard 上轻松制作，如果您愿意，也可以使用 1A 电桥组件。绝对确保极性正确 - 如果极性错误，过滤器盖和调节器将会被损坏！&lt;/span&gt;&lt;/p&gt;&lt;hr style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;/&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;下一个问题是如何将幻象电源实际发送到麦克风而不是混音器输入电路。后者不会对施加的 48V DC 印象深刻，并且很可能会通过立即失败来表达他们的不满。幻像馈电电路的标准值 6.81k（0.1% 容差）可以降低到 6.8k（标准 E12 系列电阻值），我建议使用万用表将电阻匹配到至少 0.1% 是最简单的，并且最便宜的替代方案。为了获得最佳效果，每对电阻器之间的匹配误差应在 10 欧姆以内（如果可能的话，甚至更小）。这优于 0.1%，并确保共模性能不受影响。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;如果您想知道我所说的 10 欧姆优于 0.1%，最坏情况下一对 0.1% 6.81k 电阻器可能会有 13.62 欧姆的差异 - 一个电阻器处于最大正容差，另一个电阻器处于最大负容差。很明显，匹配越接近越好，并且所使用的万用表不必绝对准确，因为您测量的是差异而不是绝对电阻值。如果您的万用表拒绝测量所需的位数，请参阅&lt;/span&gt;&lt;a href=&quot;https://sound-au.com/project96.htm#appendix&quot; style=&quot;color: rgb(0, 51, 153); text-decoration-line: none;&quot;&gt;附录&lt;/a&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;以了解可以使用的替代方法。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;图 2 显示了基本的幻象供电方案。仅显示一个通道 - 后续通道相同，单个电源模块的典型最大值为 10 个（紧要关头为 20 个）。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;尽管显示使用双极电解盖，但一些构造者无疑会想要使用“更好”的东西，但聚酯或类似的盖在这些值下将非常大！假设麦克风电路输入阻抗为 1.2k（相当典型），如图所示的两个 22uF 电容将给出 12Hz 的 -3dB 频率 - 这是获得 20Hz 平坦响应所必需的。当然，如果您需要的最低频率较高，则可以接受较低的电容。同样，如果麦克风前置放大器的输入阻抗高于1.2k，也可以使用较小的电容。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;值得注意的是，许多混频器在幻象电源电路的输入端使用极化电解。虽然在应用幻象电源时这完全没问题，但在不使用幻象电源时上限将是无偏差的。这通常没问题，只要电容器上的瞬时电压不超过 1V。在某些情况下，使用非偏振帽可能会产生声音失真或音染。对于“无成本”设计，请使用 10uF/50V（或更高）聚酯帽，封装在自己的屏蔽罐中。这些可以轻松连接到 PCB 中。如果您选择对 C1 和 C2 使用极化电解电容，则正极端必须面向麦克风输入（连接到 6.8k 电阻）。&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;t-pic&quot; style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 11pt; font-weight: bold; text-align: center; white-space: normal;&quot;&gt;&lt;img data-width=&quot;658&quot; data-height=&quot;307&quot; src=&quot;https://sound-au.com/p96-f2.gif&quot; border=&quot;1&quot;/&gt;&lt;br/&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;图 2 - 幻象供电电路（P96B PCB）&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;必须如图所示使用齐纳二极管来限制施加到麦克风输入电路的最大电压。最糟糕的情况是当幻象电源打开时麦克风引线连接到麦克风。该电缆实际上是一个电容器，电缆和耦合帽的突然放电会产生通过齐纳二极管的高电流，齐纳二极管必须能够承受浪涌而不会出现故障。幸运的是，1W 齐纳二极管足够坚固，可以承受，这几乎是行业标准电路。 1W 10V 齐纳二极管的最大浪涌电流通常约为 450mA，在实践中不太可能超过该值。指定 10V 齐纳二极管是因为任何麦克风几乎不可能超过该电平，并且麦克风前置放大器将在您达到齐纳二极管施加的 7V RMS 输入电压限制之前进行削波。此外，10V 齐纳二极管比更高电压的齐纳二极管具有更高的电流容量，从而提供了额外的安全裕度。 10 欧姆串联电阻对输入电平或噪声影响很小或没有影响，并有助于限制峰值齐纳电流。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;一些调音台拥有“静音”幻象开关，以减轻幻象电源打开或关闭时通过调音台发出的典型响亮的“砰”声。幻象分配PCB（2通道）具有此功能，但此处未显示。&lt;/span&gt;&lt;/p&gt;&lt;hr style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;/&gt;&lt;p&gt;&lt;strong style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;建造&lt;/strong&gt;&lt;span style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; background-color: #FFFFFF;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;很自然地，我建议使用 PCB，因为这使得施工变得非常容易。 PCB 的尺寸仅为 64mm x 38mm (2.5&amp;quot; x 1.5&amp;quot;)，因此很容易改装到除最紧凑的调音台之外的所有调音台中。如果根本没有空间，外部盒子可以容纳调节器和配电板。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;如果您不想购买 PCB，则可以使用 Veroboard，但除非非常小心接地安排，否则噪音几乎肯定会比报价的要差。所有电解电容的额定电压应为 50V 或更高（&lt;/span&gt;&lt;small&gt;&lt;strong&gt;注意：&lt;/strong&gt;&lt;/small&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;图 1 中的 C5 的额定电压&lt;/span&gt;&lt;em&gt;必须&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;为 63V！）。 C7推荐使用标准50V陶瓷，用于保证稳压器不振荡。未显示（或不需要）与电解液并联的薄膜帽 - 如果您愿意，可以添加这些薄膜帽，但通过显示的过滤，高频噪声应该不存在。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;电源变压器不需要太花哨，但我建议为其配备一个单独的盒子，以最大限度地减少嗡嗡声和噪音。通常，20VA 15-0-15V（或具有 30V 连接的多抽头变压器）就足够了。这些在澳大利亚很容易买到，但我不能代表世界其他地方。如果最坏的情况发生，你可以使用一对单绕组15V变压器，将绕组串联起来提供30V电压。如果可能的话，我建议使用传统的“EI”变压器，因为初级和次级之间的电容较小，并且允许较少的高频电源噪声通过。&lt;/span&gt;&lt;/p&gt;&lt;table width=&quot;100%&quot;&gt;&lt;tbody&gt;&lt;tr class=&quot;firstRow&quot;&gt;&lt;td style=&quot;font-size: 12pt;&quot;&gt;&lt;img data-width=&quot;108&quot; data-height=&quot;37&quot; src=&quot;https://sound-au.com/note.gif&quot;/&gt;&lt;/td&gt;&lt;td style=&quot;font-size: 12pt;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;变压器不得用于为其他电源或设备供电，这一点极其重要。中心抽头&lt;/span&gt;&lt;em&gt;不得&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;连接到任何东西，并且需要绝缘以防止接触。电源电路在浮动配置中使用完整的 30V 交流电，连接到另一个电源或整流器将导致绕组短路。&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;电源上的 Q1（图 1）必须配备散热器，最坏情况下功耗约为 5W。这看起来似乎没什么大不了的，但 10°C/W 散热器（典型的大型 PCB 安装类型）在 200mA 输出时将达到高于环境温度 50°C（即太热！）。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;在 100mA 负载下，功耗降低至约 3W，更易于管理。即便如此，也不存在太大的散热器，所以我建议您使用尽可能大的散热器。不需要强制空气（风扇）冷却。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;PCB 的布局使得功率晶体管可以根据需要直接连接到底盘（当然使用绝缘垫圈和散热器化合物），这减少了对单独散热器的需求。对于只有一两个幻象供电的麦克风，散热器不是必需的，但一个小的散热器是便宜的保险。在这种情况下，图 1 中的 R1 和 R2 的值可能会增加，这将提供更好的滤波。对于两个麦克风系统来说，100 欧姆就足够了。&lt;/span&gt;&lt;/p&gt;&lt;hr style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;/&gt;&lt;p&gt;&lt;a name=&quot;appendix&quot; style=&quot;color: rgb(0, 51, 153); font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;/a&gt;&lt;strong style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;附录 - 电阻匹配&lt;/strong&gt;&lt;span style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; background-color: #FFFFFF;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;古老的方法有时是最好的。惠斯通电桥曾经是精确测量电阻、电感和电容的标准方法，但新的数字仪器已经取代。这是一种耻辱（我认为），因为旧方法实际上在您使用它们时教会了您一些东西 - 而不是任何数字仪器的情况。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;惠斯通电桥很容易设置，虽然它在绝对意义上不是特别准确，但它可以对组件之间的&lt;/span&gt;&lt;em&gt;变化&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;极其敏感。使用电源、9V 电池（或者更好的是来自变压器的 12V 交流电压），图 3 中所示的电路将通过合适的测试设置轻松解决 1 欧姆的差异。 10 欧姆的差异将从 12V 输入产生 4.38mV 的输出信号。&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;t-pic&quot; style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 11pt; font-weight: bold; text-align: center; white-space: normal;&quot;&gt;&lt;img data-width=&quot;658&quot; data-height=&quot;253&quot; src=&quot;https://sound-au.com/p96-f3.gif&quot; border=&quot;1&quot;/&gt;&lt;br/&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;图 3 - 惠斯通电桥&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;由于桥式电路并不关心使用交流电还是直流电，因此可以使用放大器来检测零点，并且可以使其变得几乎令人难以置信的灵敏。使用时，如图所示连接电路，并用仪表或放大器和耳机（或扬声器）监测差异信号。&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;请注意&lt;/strong&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;- 移除 DUT（被测设备）后，放大器输入信号将为 6V RMS（对于 12V 输入），除非按所示安装 D1 和 D2。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;您手头上将有许多 6.8k 电阻器，它们都具有相同的标称值，但具有正常 (1%) 容差。安装一个作为测试电阻，并将 VR1 调整为完全零（无信号）。现在这就是您的参考电阻。将剩余电阻一一连接到电路中，并以输出信号小于4mV为目标——不要重新调整VR1。希望您会找到许多接近您选择的参考的电阻器 - 如果没有，只需选择不同的电阻器用作参考，然后重新平衡电桥。重复这些测试，直到找到所需数量的电阻对 - 如果您正确进行了测试和选择，现在每对电阻都将非常匹配。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;如果您使用放大器进行监听，&lt;/span&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;信号输入（毫不奇怪地应用于 Sig1 和 Sig2）&lt;/span&gt;&lt;/span&gt;&lt;em&gt;必须&lt;/em&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;浮动，因为如图所示，放大器输入的一侧将接地。 50 或 60Hz 12V 变压器就足够了。仅当 DUT 牢固连接时才按 TEST 按钮，否则输出确实会很大。在监视器端子上连接一对二极管 - 并联且极性相反。如果在 DUT 端子上没有连接任何东西时按下“测试”按钮，这将使最大级别保持在更合理的水平。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: verdana, arial, helvetica, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;span style=&quot;vertical-align: inherit;&quot;&gt;惠斯通电桥是一种非常有用的设备，可用于比较电阻器、电容器和电感器 - 实际上，您可以通过这种方式匹配任何无源元件甚至完整网络。惠斯通电桥还用于精密温度测量、应变仪（用于测试结构中的机械运动）以及许多其他用途。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Wed, 21 Feb 2024 20:46:28 +0800</pubDate></item><item><title>使用 wxSmith 进行 wxWidgets GUI 编程简介</title><link>https://175.es/blog/post/662.html</link><description>&lt;h2 style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 29px; line-height: 1.4; color: rgb(255, 153, 0); margin: 20px 0px 11px; padding: 0px 0px 10px; font-weight: 400; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;介绍&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;wxWidgets 是一个用 C++ 进行跨平台 GUI 开发的框架。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;该框架由爱丁堡大学人工智能应用研究所的 Julian Smart 于 1992 年发起，此后被移植到许多平台。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;本文旨在指导初级程序员安装所需的资源，并使用 Code::Blocks 作为 IDE 使用 wxWidgets 开发单个应用程序。&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 29px; line-height: 1.4; color: rgb(255, 153, 0); margin: 20px 0px 11px; padding: 0px 0px 10px; font-weight: 400; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;什么是 wxWidgets&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;wxWidgets是一组符合多平台GUI开发框架的C++库。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;它提供了一个易于使用的 API，与 MFC API 非常相似。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;将其与适当的库链接并编译使您的应用程序看起来适合目标平台。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;wxWidgets 是一个非常完整的框架，提供了几乎所有您需要的解决方案，但保持了使用的简单性。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 29px; line-height: 1.4; color: rgb(255, 153, 0); margin: 20px 0px 11px; padding: 0px 0px 10px; font-weight: 400; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;为什么选择 wxWidgets&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;有许多选项可用于跨平台 GUI 开发。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;也许最流行的语言之一是 Java，但对于某些应用程序来说，它并不是一个有效的替代方案。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;在C++中，有QT，一个很棒的框架，但是首先必须提到它的一些缺点，它模拟平台外观，而wxWidgets使用平台库来创建图形界面；&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;其次，QT 有一种不同的方法，在您编写的代码和编译的最终 C++ 代码之间使用专有层。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;不要提及仅适用于 Windows 的基于 Microsoft Visual 的框架，或者某些像 mono.net 这样层层叠加的框架。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;与该示例相反，wxWidgets 是 C++，因此具有这种效率并且不会向您的代码添加任何额外的层。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;它是一组库，因此您可以使用您想要的 C++ 编译器来编译它，不是每个 C++ 编译器，而是最常见的编译器。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;其他优点和特点：&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;margin-top: 10px; margin-bottom: 10px; padding: 0px 0px 0px 40px; border: 0px; color: rgb(17, 17, 17); font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;它仍在开发中，并得到了开源社区的大力支持和协作。&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;个人和商业用途完全免费。&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;网上有很多文档。&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;易于学习。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;这只是 C++。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;有许多现成的类和库可用。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;看看&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://wxcode.sourceforge.net/complist.php&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; text-decoration-line: none; color: rgb(0, 87, 130);&quot;&gt;这里&lt;/a&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 29px; line-height: 1.4; color: rgb(255, 153, 0); margin: 20px 0px 11px; padding: 0px 0px 10px; font-weight: 400; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;入门&lt;/span&gt;&lt;/h2&gt;&lt;div class=&quot;trimmed&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; color: rgb(17, 17, 17); font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255); width: auto;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;我们开始谈正事吧。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;首先我们需要框架本身和一个IDE来帮助我们开发。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;然后我们就可以做一些魔法并在屏幕上放置一个“Hello World”窗口。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 19px; line-height: 1.4; color: rgb(255, 153, 0); font-weight: normal; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;安装&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;我将展示 Windows 的安装步骤，但其他操作系统的安装步骤完全相同。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;我选择 Code::Blocks IDE 是因为它与 wxWidgets 集成，并且它是免费的并且有适用于 Windows 和 Linux 的稳定版本。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4 style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 17px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;1. 下载并安装Code::Blocks&lt;/span&gt;&lt;/h4&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;您可以从 Code::Blocks 自己的 &amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.codeblocks.org/downloads/26&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; text-decoration-line: none; color: rgb(0, 87, 130);&quot;&gt;网页&lt;/a&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;下载二进制版本。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;我建议下载最新的稳定 mingw 版本，此时是 codeblocks-13.12mingw-setup，它附带 de mingw 编译器。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;只需下载安装程序并以经典的 Windows 方式安装即可。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;可能您必须将 mingw/bin 目录的路径添加到 PATH 环境变量中。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;如果有人对此有任何疑问，我可以添加更多信息。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4 style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 17px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;2.下载、安装和编译wxWidgets&lt;/span&gt;&lt;/h4&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;您可以从其存储库下载 wxWidgets 资源。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;下载 wxMSW 安装程序或 ZIP，因为 de 安装程序只是一个压缩文件夹。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;下载稳定&lt;/span&gt;&lt;/span&gt;&lt;strong style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;版本 3.0.1，&amp;nbsp;&lt;/strong&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;因为它是推荐用于 Windows 7 的最后一个稳定版本。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;下载安装程序或 ZIP 文件后，将其安装/解压缩到 C:\ 中。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;打开命令外壳（Windows 中的标准控制台），切换到 wxWidget 构建目录&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;这里的关键是使用稍后开发时使用的相同编译器来编译 wxWidgets。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;如果您已使用 mingw 安装了 C::B IDE 并将路径添加到环境变量，则不会有任何问题。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;pre-lang&quot; id=&quot;premain83251&quot; style=&quot;margin: 5px 0px 0px; padding: 4px 8px; border-width: 0px 0px 1px; border-top-style: initial; border-right-style: initial; border-bottom-style: solid; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-bottom-color: rgb(255, 208, 68); border-left-color: initial; border-image: initial; background-color: rgb(251, 237, 187); justify-content: space-between; color: rgb(153, 153, 153); font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; white-space: normal; display: flex !important;&quot;&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; font-size: 13px;&quot;&gt;&lt;span id=&quot;copycode83251&quot; class=&quot;copy-code&quot; data-index=&quot;83251&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; cursor: pointer; transition: color 0.1s linear 0s; visibility: visible;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 460 460&quot; style=&quot;width: 16px;height:16px;&quot; xml:space=&quot;preserve&quot;&gt;&lt;g&gt;&lt;path d=&quot;M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre id=&quot;pre83251&quot; data-allowshrink=&quot;True&quot; data-collapse=&quot;False&quot; data-codeblock-processed=&quot;true&quot; class=&quot;notranslate&quot; style=&quot;background-color: rgb(251, 237, 187); padding: 6px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-family: Consolas, monospace, mono; white-space: pre-wrap; overflow: auto; border: 1px solid rgb(251, 237, 187); tab-size: 4; overflow-wrap: break-word; word-break: break-word; margin-top: 0px;&quot;&gt;cd&amp;nbsp;&amp;lt;wxwidgets&amp;gt;\build\msw&lt;/pre&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;其中 &amp;lt;wxwidgets&amp;gt; 是您将源代码提取到的路径（通常是 C:\wxWidgets-3.0.1）。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;在那里你必须执行构建命令，对于 gcc 编译器来说它会像这样：&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;pre-lang&quot; id=&quot;premain840790&quot; style=&quot;margin: 5px 0px 0px; padding: 4px 8px; border-width: 0px 0px 1px; border-top-style: initial; border-right-style: initial; border-bottom-style: solid; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-bottom-color: rgb(255, 208, 68); border-left-color: initial; border-image: initial; background-color: rgb(251, 237, 187); justify-content: space-between; color: rgb(153, 153, 153); font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; white-space: normal; display: flex !important;&quot;&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; font-size: 13px;&quot;&gt;&lt;span id=&quot;copycode840790&quot; class=&quot;copy-code&quot; data-index=&quot;840790&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; cursor: pointer; transition: color 0.1s linear 0s; visibility: visible;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 460 460&quot; style=&quot;width: 16px;height:16px;&quot; xml:space=&quot;preserve&quot;&gt;&lt;g&gt;&lt;path d=&quot;M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre id=&quot;pre840790&quot; data-allowshrink=&quot;True&quot; data-collapse=&quot;False&quot; data-codeblock-processed=&quot;true&quot; class=&quot;notranslate&quot; style=&quot;background-color: rgb(251, 237, 187); padding: 6px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-family: Consolas, monospace, mono; white-space: pre-wrap; overflow: auto; border: 1px solid rgb(251, 237, 187); tab-size: 4; overflow-wrap: break-word; word-break: break-word; margin-top: 0px;&quot;&gt;mingw32-make&amp;nbsp;-f&amp;nbsp;makefile.gcc&amp;nbsp;BUILD=release&amp;nbsp;SHARED=1&amp;nbsp;MONOLITHIC=1&amp;nbsp;UNICODE=1&amp;nbsp;CXXFLAGS=-fno-keep-inline-dllexport&lt;/pre&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;花点时间查看编译变量，以便您可以选择适合您的：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;BUILD：wxWidget的构建类型。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;在大多数情况下，您将使用“release”，因为您不会调试 wxWidgets 本身。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;您可以调试链接到 wxWidgets 发行版本的自己的程序。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;SHARED：此变量定义链接类型：&lt;/span&gt;&lt;strong style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;动态&lt;/strong&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;链接 (SHARED=1)，并且您必须与可执行文件或&lt;/span&gt;&lt;strong style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;静态&lt;/strong&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;链接 (SHARED=0)共享所需的 DLL&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;&lt;/strong&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;，因此您只需共享可执行文件。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;动态构建生成的可执行文件尺寸较小，但您的 PC 中需要所需的 DLL 才能运行它。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;MONOLITHIC：控制是构建单个 DLL (MONOLITHIC=1) 还是多个 DLL (MONOLITHIC=0)。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;使用单片构建开发会更加容易，并且您只有一个库可以与可执行文件共享，但是使用构建的多文件，链接过程会更加高效，因为您可以避免链接整个 wxWidget 代码库。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;UNICODE：定义wxWidget和你的程序是使用宽字符串（UNICODE=1）还是ANSI（UNICODE=0）。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;强烈建议使用 wxWidget _(&amp;quot;string&amp;quot;) 和 _T(&amp;quot;string&amp;quot;) 宏来确保硬编码字符串的格式正确。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;现在我们已经构建了 wxWidgets，因此可以开始开发一些基于框架的程序。&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 19px; line-height: 1.4; color: rgb(255, 153, 0); font-weight: normal; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;创建项目&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;1. 首先启动 Code::Blocks 并选择&lt;/span&gt;&lt;em style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;Create New Project&lt;/em&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;img height=&quot;270px&quot; src=&quot;https://www.codeproject.com/KB/cross-platform/803106/CodeBlock1.PNG&quot; width=&quot;500px&quot; alt=&quot;图1&quot; class=&quot;lazyautosizes ls-is-cached lazyloaded&quot; data-sizes=&quot;auto&quot; data-srcset=&quot;/KB/cross-platform/803106/CodeBlock1-r-400.PNG 400w, /KB/cross-platform/803106/CodeBlock1.PNG 500w&quot; sizes=&quot;500px&quot; srcset=&quot;/KB/cross-platform/803106/CodeBlock1-r-400.PNG 400w, /KB/cross-platform/803106/CodeBlock1.PNG 500w&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; opacity: 1; transition: opacity 300ms ease 0s;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;2. 在项目选择窗口中选择&lt;/span&gt;&lt;em style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;wxWidget&lt;/em&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;img height=&quot;451px&quot; src=&quot;https://www.codeproject.com/KB/cross-platform/803106/projectType.PNG&quot; width=&quot;602px&quot; alt=&quot;图2&quot; data-src=&quot;/KB/cross-platform/803106/projectType.PNG&quot; class=&quot;lazyautosizes lazyloaded&quot; data-sizes=&quot;auto&quot; data-srcset=&quot;/KB/cross-platform/803106/projectType-r-400.PNG 400w, /KB/cross-platform/803106/projectType.PNG 602w&quot; sizes=&quot;602px&quot; srcset=&quot;/KB/cross-platform/803106/projectType-r-400.PNG 400w, /KB/cross-platform/803106/projectType.PNG 602w&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; opacity: 1; transition: opacity 300ms ease 0s;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;3. 现在你必须选择wxWidgets版本。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;请务必选择您已安装的那个。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;如果您按照此说明进行操作，请选择&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;3.0.x&lt;/em&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;img height=&quot;468px&quot; src=&quot;https://www.codeproject.com/KB/cross-platform/803106/wxSel.PNG&quot; width=&quot;519px&quot; alt=&quot;图3&quot; data-src=&quot;/KB/cross-platform/803106/wxSel.PNG&quot; class=&quot;lazyautosizes lazyloaded&quot; data-sizes=&quot;auto&quot; data-srcset=&quot;/KB/cross-platform/803106/wxSel-r-400.PNG 400w, /KB/cross-platform/803106/wxSel.PNG 519w&quot; sizes=&quot;519px&quot; srcset=&quot;/KB/cross-platform/803106/wxSel-r-400.PNG 400w, /KB/cross-platform/803106/wxSel.PNG 519w&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; opacity: 1; transition: opacity 300ms ease 0s;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;4. 然后将出现命名项目窗口。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;您可以在此处输入项目名称和项目位置。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;我很有创意，把它命名为HelloWorld&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;img height=&quot;468px&quot; src=&quot;https://www.codeproject.com/KB/cross-platform/803106/projName.PNG&quot; width=&quot;522px&quot; alt=&quot;图4&quot; data-src=&quot;/KB/cross-platform/803106/projName.PNG&quot; class=&quot;lazyautosizes lazyloaded&quot; data-sizes=&quot;auto&quot; data-srcset=&quot;/KB/cross-platform/803106/projName-r-400.PNG 400w, /KB/cross-platform/803106/projName.PNG 522w&quot; sizes=&quot;522px&quot; srcset=&quot;/KB/cross-platform/803106/projName-r-400.PNG 400w, /KB/cross-platform/803106/projName.PNG 522w&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; opacity: 1; transition: opacity 300ms ease 0s;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;5. 现在您必须选择GUI Builder，它是帮助您以图形方式创建图形界面的工具。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;我们将使用&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;xwSmith&lt;/em&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;应用程序类型选择&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;Frame Based&lt;/em&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;img height=&quot;468px&quot; src=&quot;https://www.codeproject.com/KB/cross-platform/803106/wxSmithSel.PNG&quot; width=&quot;520px&quot; alt=&quot;图5&quot; data-src=&quot;/KB/cross-platform/803106/wxSmithSel.PNG&quot; class=&quot;lazyautosizes lazyloaded&quot; data-sizes=&quot;auto&quot; data-srcset=&quot;/KB/cross-platform/803106/wxSmithSel-r-400.PNG 400w, /KB/cross-platform/803106/wxSmithSel.PNG 520w&quot; sizes=&quot;520px&quot; srcset=&quot;/KB/cross-platform/803106/wxSmithSel-r-400.PNG 400w, /KB/cross-platform/803106/wxSmithSel.PNG 520w&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; opacity: 1; transition: opacity 300ms ease 0s;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;6. 出现的下一个窗口要求您选择 wxWidgets 在计算机中的位置。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;更好的选择是保留全局变量。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;当您单击“下一步”时，将出现全局变量菜单，因此您必须在&lt;/span&gt;&lt;/span&gt;&lt;strong style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;基本&lt;/strong&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;字段中输入 wxWidgets 路径。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;然后，如果您更改 wxWidgets 的位置，您可以从 Code::Blocks 配置中编辑全局变量。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;img height=&quot;467px&quot; src=&quot;https://www.codeproject.com/KB/cross-platform/803106/wxPath.PNG&quot; width=&quot;521px&quot; alt=&quot;图6&quot; data-src=&quot;/KB/cross-platform/803106/wxPath.PNG&quot; class=&quot;lazyautosizes lazyloaded&quot; data-sizes=&quot;auto&quot; data-srcset=&quot;/KB/cross-platform/803106/wxPath-r-400.PNG 400w, /KB/cross-platform/803106/wxPath.PNG 521w&quot; sizes=&quot;521px&quot; srcset=&quot;/KB/cross-platform/803106/wxPath-r-400.PNG 400w, /KB/cross-platform/803106/wxPath.PNG 521w&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; opacity: 1; transition: opacity 300ms ease 0s;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;7. 选择编译器。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;保留默认即可（GCC 编译器。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;img height=&quot;467px&quot; src=&quot;https://www.codeproject.com/KB/cross-platform/803106/debugRel.PNG&quot; width=&quot;520px&quot; alt=&quot;图7&quot; data-src=&quot;/KB/cross-platform/803106/debugRel.PNG&quot; class=&quot;lazyautosizes lazyloaded&quot; data-sizes=&quot;auto&quot; data-srcset=&quot;/KB/cross-platform/803106/debugRel-r-400.PNG 400w, /KB/cross-platform/803106/debugRel.PNG 520w&quot; sizes=&quot;520px&quot; srcset=&quot;/KB/cross-platform/803106/debugRel-r-400.PNG 400w, /KB/cross-platform/803106/debugRel.PNG 520w&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; opacity: 1; transition: opacity 300ms ease 0s;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;8. 现在我们有一些配置选项。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;在第一部分中，您必须将此选项与构建 wxWidgets 时使用的选项相匹配。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;img height=&quot;468px&quot; src=&quot;https://www.codeproject.com/KB/cross-platform/803106/opts.PNG&quot; width=&quot;519px&quot; alt=&quot;图8&quot; data-src=&quot;/KB/cross-platform/803106/opts.PNG&quot; class=&quot;lazyautosizes lazyloaded&quot; data-sizes=&quot;auto&quot; data-srcset=&quot;/KB/cross-platform/803106/opts-r-400.PNG 400w, /KB/cross-platform/803106/opts.PNG 519w&quot; sizes=&quot;519px&quot; srcset=&quot;/KB/cross-platform/803106/opts-r-400.PNG 400w, /KB/cross-platform/803106/opts.PNG 519w&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; opacity: 1; transition: opacity 300ms ease 0s;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;em style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;使用 wxWidgets DLL&lt;/em&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;，检查是否使用 SHARED=1 进行构建。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;em style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;wxWidgets 是作为一个整体库构建的&lt;/em&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;，检查您是否使用 MONOLITHIC=1 构建。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;em style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;启用 unicode&lt;/em&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;，检查您是否使用 UNICODE=1 进行构建。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;例如，在屏幕截图中，我未选中“&lt;/span&gt;&lt;em style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;使用 wxWidgets DLL”&lt;/em&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;，因为我使用 SHARED=0 构建了 wxWidgets。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;并检查高级选项。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;9. 至少在最后一个窗口中，不要选中&lt;/span&gt;&lt;em style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;Use __WXDEBUG__ 和 Debug wxWidgets lib&lt;/em&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;选项&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;img height=&quot;469px&quot; src=&quot;https://www.codeproject.com/KB/cross-platform/803106/lastlastsels.PNG&quot; width=&quot;519px&quot; alt=&quot;图9&quot; data-src=&quot;/KB/cross-platform/803106/lastlastsels.PNG&quot; class=&quot;lazyautosizes lazyloaded&quot; data-sizes=&quot;auto&quot; data-srcset=&quot;/KB/cross-platform/803106/lastlastsels-r-400.PNG 400w, /KB/cross-platform/803106/lastlastsels.PNG 519w&quot; sizes=&quot;519px&quot; srcset=&quot;/KB/cross-platform/803106/lastlastsels-r-400.PNG 400w, /KB/cross-platform/803106/lastlastsels.PNG 519w&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; opacity: 1; transition: opacity 300ms ease 0s;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;当您按“完成”按钮时，可能会出现一个对话框窗口，告知没有调试版本，请单击“接受”。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;您可以使用发布的 wxWidget 版本进行调试，没有任何问题。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;10. 现在，开发窗口就在我们面前。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;一定是这样的：&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;img height=&quot;323px&quot; src=&quot;https://www.codeproject.com/KB/cross-platform/803106/jOFiDkP_-_Imgur.png&quot; width=&quot;600px&quot; alt=&quot;图10&quot; data-src=&quot;/KB/cross-platform/803106/jOFiDkP_-_Imgur.png&quot; class=&quot;lazyautosizes lazyloaded&quot; data-sizes=&quot;auto&quot; data-srcset=&quot;/KB/cross-platform/803106/jOFiDkP_-_Imgur-r-400.png 400w, /KB/cross-platform/803106/jOFiDkP_-_Imgur.png 600w&quot; sizes=&quot;600px&quot; srcset=&quot;/KB/cross-platform/803106/jOFiDkP_-_Imgur-r-400.png 400w, /KB/cross-platform/803106/jOFiDkP_-_Imgur.png 600w&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; opacity: 1; transition: opacity 300ms ease 0s;&quot;/&gt;&lt;/p&gt;&lt;h3 style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 19px; line-height: 1.4; color: rgb(255, 153, 0); font-weight: normal; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;添加一些东西到我们的窗口&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;如果您按下“构建并运行”按钮（带有齿轮和三角形（播放符号）的按钮），它将显示一个小窗口，其中有一个菜单栏，其中有两个选项：“菜单”和“帮助”，以及一个空的状态栏。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;但这是检查其是否一切正常的好方法。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;现在我将解释如何向窗口添加文本标签和按钮。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;我不会深入介绍您可以使用的许多选项和小部件，因为本教程的目的是简单介绍该框架。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;但我会解释一些有关开发环境的事情。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;在中心我们可以看到设计窗口。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;在那里我们可以根据我们正在编辑的文件来编辑图形界面或代码。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;在此窗口上方有两个按钮，一个用于打开菜单栏编辑器，另一个用于打开状态栏编辑器。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;但最重要的是，在设计窗口下方，我们有一组按钮，其中包含我们可以在按类别组织的开发中使用的小部件。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;在左侧，我们看到两个不同的部分，向上的资源/文件浏览器和向下的属性编辑器。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;资源/文件浏览器让我们可以轻松找到要编辑的文件或资源。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;顶部有一些选项卡。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;有了他们，我们就可以改变不同的观点。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;最重要的是“项目”选项卡和“资源”选项卡。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;img height=&quot;284px&quot; src=&quot;https://www.codeproject.com/KB/cross-platform/803106/ProjectTree.PNG&quot; width=&quot;261px&quot; alt=&quot;图11&quot; data-src=&quot;/KB/cross-platform/803106/ProjectTree.PNG&quot; class=&quot; lazyloaded&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; opacity: 1; transition: opacity 300ms ease 0s;&quot;/&gt;&amp;nbsp;&lt;img height=&quot;364px&quot; src=&quot;https://www.codeproject.com/KB/cross-platform/803106/resourceTree.PNG&quot; width=&quot;257px&quot; alt=&quot;图12&quot; data-src=&quot;/KB/cross-platform/803106/resourceTree.PNG&quot; class=&quot; lazyloaded&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; opacity: 1; transition: opacity 300ms ease 0s;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&amp;nbsp;在项目树中，我们可以找到程序中隐含的所有文件。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;在资源树中我们可以找到图形资源。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;文件/资源导航器下方的属性编辑器将允许我们直接修改一些资源属性。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;img height=&quot;331px&quot; src=&quot;https://www.codeproject.com/KB/cross-platform/803106/ResProp.PNG&quot; width=&quot;243px&quot; alt=&quot;图13&quot; data-src=&quot;/KB/cross-platform/803106/ResProp.PNG&quot; class=&quot; lazyloaded&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; opacity: 1; transition: opacity 300ms ease 0s;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;稍后当我们处理窗口时我会回到这个话题。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;右侧有一个按钮栏，它会影响一些资源。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;前四个确定将添加新资源的位置（在指针上、实际元素内部以及实际元素前面的 o 后面）。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;然后我们有用于删除当前元素的十字形按钮，其下方有“显示预览”按钮。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;最低打开属性面板，其中有一些位置和大小选项。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;img height=&quot;288px&quot; src=&quot;https://www.codeproject.com/KB/cross-platform/803106/BarraDer.PNG&quot; width=&quot;39px&quot; alt=&quot;图14&quot; data-src=&quot;/KB/cross-platform/803106/BarraDer.PNG&quot; class=&quot; lazyloaded&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; opacity: 1; transition: opacity 300ms ease 0s;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;添加一些东西&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;我将解释的前三个步骤是您可以用于每个新项目的基本步骤。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;1. 从设计窗口下方的小部件菜单中选择“布局”选项卡。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;在这里我们找到&lt;/span&gt;&lt;/span&gt;&lt;em style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;尺寸测量器。&lt;/em&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;大小调整器帮助我们在窗口中定位元素并调整其大小。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;当有人调整窗口大小时，大小调整器会负责调整元素和元素间空间的大小。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;因此从Layout元素中选择基本的&lt;/span&gt;&lt;em style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;wxBoxSizer。&lt;/em&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;该尺寸调整器将元素有机地排列在水平或垂直的一行中。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;要向窗口添加一些元素，请单击所需的元素（本例中为 wxBoxSizer），然后单击设计窗口中的虚线面板内部。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;现在窗口必须如下所示：&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;img height=&quot;474px&quot; src=&quot;https://www.codeproject.com/KB/cross-platform/803106/Box.PNG&quot; width=&quot;426px&quot; alt=&quot;图15&quot; data-src=&quot;/KB/cross-platform/803106/Box.PNG&quot; class=&quot;lazyautosizes lazyloaded&quot; data-sizes=&quot;auto&quot; data-srcset=&quot;/KB/cross-platform/803106/Box-r-400.PNG 400w, /KB/cross-platform/803106/Box.PNG 426w&quot; sizes=&quot;426px&quot; srcset=&quot;/KB/cross-platform/803106/Box-r-400.PNG 400w, /KB/cross-platform/803106/Box.PNG 426w&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; opacity: 1; transition: opacity 300ms ease 0s;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;2. 我们现在可以开始添加一些元素，但首先我们添加一些额外的东西。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;首先，选择小部件菜单的“标准”选项卡，单击 wxPanel，然后单击小方块内部以向其添加面板。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;确保选择了 boxSizer，要知道这一点，只需查看左侧的资源树，您将看到 sizer 已添加到树中，当您在图形屏幕中选择它时，它会在资源树中选择反之亦然。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;wxPanel会添加一个精美的背景并给窗口添加一些特性。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;img height=&quot;475px&quot; src=&quot;https://www.codeproject.com/KB/cross-platform/803106/BoxPane.PNG&quot; width=&quot;512px&quot; alt=&quot;图16&quot; data-src=&quot;/KB/cross-platform/803106/BoxPane.PNG&quot; class=&quot;lazyautosizes lazyloaded&quot; data-sizes=&quot;auto&quot; data-srcset=&quot;/KB/cross-platform/803106/BoxPane-r-400.PNG 400w, /KB/cross-platform/803106/BoxPane.PNG 512w&quot; sizes=&quot;512px&quot; srcset=&quot;/KB/cross-platform/803106/BoxPane-r-400.PNG 400w, /KB/cross-platform/803106/BoxPane.PNG 512w&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; opacity: 1; transition: opacity 300ms ease 0s;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;3. 现在我们在面板内部添加另一个 wxBoxSizer。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;因此，选择 wxPanel 后，单击“布局”选项卡中的 wxBoxSizer，然后在框内再次单击。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;现在窗口可能如下图所示：&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;img height=&quot;479px&quot; src=&quot;https://www.codeproject.com/KB/cross-platform/803106/BoxPaneBox.PNG&quot; width=&quot;529px&quot; alt=&quot;图17&quot; data-src=&quot;/KB/cross-platform/803106/BoxPaneBox.PNG&quot; class=&quot;lazyautosizes lazyloaded&quot; data-sizes=&quot;auto&quot; data-srcset=&quot;/KB/cross-platform/803106/BoxPaneBox-r-400.PNG 400w, /KB/cross-platform/803106/BoxPaneBox.PNG 529w&quot; sizes=&quot;529px&quot; srcset=&quot;/KB/cross-platform/803106/BoxPaneBox-r-400.PNG 400w, /KB/cross-platform/803106/BoxPaneBox.PNG 529w&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; opacity: 1; transition: opacity 300ms ease 0s;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;对于大多数程序来说，这些步骤都是一个良好的开始。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;现在我们添加交互元素。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;4. Hello Worl 程序必须显示 Hello World 文本，所以让我们添加它。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;在“标准”选项卡中选择“wxStaticText”并在框内单击。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;这会向窗口添加一个文本标签。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;img height=&quot;479px&quot; src=&quot;https://www.codeproject.com/KB/cross-platform/803106/Label.PNG&quot; width=&quot;332px&quot; alt=&quot;图18&quot; data-src=&quot;/KB/cross-platform/803106/Label.PNG&quot; class=&quot; lazyloaded&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; opacity: 1; transition: opacity 300ms ease 0s;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;如果您查看左侧的资源属性编辑器，您可以看到一个包含一些变量和值的表。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;img height=&quot;209px&quot; src=&quot;https://www.codeproject.com/KB/cross-platform/803106/LabelProp.PNG&quot; width=&quot;257px&quot; alt=&quot;图19&quot; data-src=&quot;/KB/cross-platform/803106/LabelProp.PNG&quot; class=&quot; lazyloaded&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; opacity: 1; transition: opacity 300ms ease 0s;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;第一个是元素的标签。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;它存在于显示文本的所有元素中，最初它表示“标签”。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;通过单击右列（值列），您可以对其进行编辑，因此，单击“标签”行的右列并编辑文本，添加诸如“Hello World”之类的巧妙内容（您知道，从另一个开始会带来霉运）文本）。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;5. 现在添加一些交互。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;我们将添加一个按钮来退出窗口。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;因此，单击“标准”选项卡上的“wxButton”按钮。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;你会看到我们正在设计的窗口变成了蓝色，现在当你将鼠标光标移到我们在上一步中添加的标签上时，它的一侧变成浅蓝色，这表明新资源将添加在哪一侧，因为 wxStaticText里面不能有任何元素，所以它会自动添加到它的一侧。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;单击右侧添加按钮。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&lt;img height=&quot;480px&quot; src=&quot;https://www.codeproject.com/KB/cross-platform/803106/Button1.PNG&quot; width=&quot;478px&quot; alt=&quot;图20&quot; data-src=&quot;/KB/cross-platform/803106/Button1.PNG&quot; class=&quot;lazyautosizes lazyloaded&quot; data-sizes=&quot;auto&quot; data-srcset=&quot;/KB/cross-platform/803106/Button1-r-400.PNG 400w, /KB/cross-platform/803106/Button1.PNG 478w&quot; sizes=&quot;478px&quot; srcset=&quot;/KB/cross-platform/803106/Button1-r-400.PNG 400w, /KB/cross-platform/803106/Button1.PNG 478w&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; opacity: 1; transition: opacity 300ms ease 0s;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;转到属性编辑器并编辑按钮的标签，就像我们对静态文本标签所做的那样，然后放置参考文本。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;由于 aur 按钮将关闭窗口，因此我在其上添加了“退出”。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;6. 您现在可以通过单击“构建并运行”按钮来尝试构建并运行该程序。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;它必须出现一个小窗口，其中包含 Hello World 文本和一个无用的按钮。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;因此，为按钮添加一些功能。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;要关闭窗口，您可以单击栏的关闭按钮（传统的十字）或转到“文件/退出”。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;在设计器中，双击我们添加的按钮，它会将我们带到 HelloWorldMain.cpp 文件（或您为项目指定的名称的主文件）。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;img height=&quot;283px&quot; src=&quot;https://www.codeproject.com/KB/cross-platform/803106/Code1.PNG&quot; width=&quot;690px&quot; alt=&quot;图21&quot; data-src=&quot;/KB/cross-platform/803106/Code1.PNG&quot; class=&quot;lazyautosizes lazyloaded&quot; data-sizes=&quot;auto&quot; data-srcset=&quot;/KB/cross-platform/803106/Code1-r-400.PNG 400w, /KB/cross-platform/803106/Code1.PNG 690w&quot; sizes=&quot;690px&quot; srcset=&quot;/KB/cross-platform/803106/Code1-r-400.PNG 400w, /KB/cross-platform/803106/Code1.PNG 690w&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; opacity: 1; transition: opacity 300ms ease 0s;&quot;/&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;也许你必须向下滚动才能找到一个名为类似的函数&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;pre-lang&quot; id=&quot;premain310462&quot; style=&quot;margin: 5px 0px 0px; padding: 4px 8px; border-width: 0px 0px 1px; border-top-style: initial; border-right-style: initial; border-bottom-style: solid; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-bottom-color: rgb(255, 208, 68); border-left-color: initial; border-image: initial; background-color: rgb(251, 237, 187); justify-content: space-between; color: rgb(153, 153, 153); font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; white-space: normal; display: flex !important;&quot;&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; font-size: 13px;&quot;&gt;&lt;span id=&quot;copycode310462&quot; class=&quot;copy-code&quot; data-index=&quot;310462&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; cursor: pointer; transition: color 0.1s linear 0s; visibility: visible;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 460 460&quot; style=&quot;width: 16px;height:16px;&quot; xml:space=&quot;preserve&quot;&gt;&lt;g&gt;&lt;path d=&quot;M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre id=&quot;pre310462&quot; data-allowshrink=&quot;True&quot; data-collapse=&quot;False&quot; data-codeblock-processed=&quot;true&quot; class=&quot;notranslate&quot; style=&quot;background-color: rgb(251, 237, 187); padding: 6px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-family: Consolas, monospace, mono; white-space: pre-wrap; overflow: auto; border: 1px solid rgb(251, 237, 187); tab-size: 4; overflow-wrap: break-word; word-break: break-word; margin-top: 0px;&quot;&gt;void&amp;nbsp;HelloWorldFrame::OnButton1Click(wxCommandEvent&amp;amp;&amp;nbsp;event)
{
}&lt;/pre&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;该函数接受按钮单击事件并执行某些操作，每当您单击按钮时都会调用该函数。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;好吧，目前它还没有做太多事情，所以我们将编辑这个函数以赋予 saome 功能。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;Soo 添加到函数主体：&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;pre-lang&quot; id=&quot;premain119408&quot; style=&quot;margin: 5px 0px 0px; padding: 4px 8px; border-width: 0px 0px 1px; border-top-style: initial; border-right-style: initial; border-bottom-style: solid; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-bottom-color: rgb(255, 208, 68); border-left-color: initial; border-image: initial; background-color: rgb(251, 237, 187); justify-content: space-between; color: rgb(153, 153, 153); font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; white-space: normal; display: flex !important;&quot;&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; font-size: 13px;&quot;&gt;&lt;span id=&quot;copycode119408&quot; class=&quot;copy-code&quot; data-index=&quot;119408&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; cursor: pointer; transition: color 0.1s linear 0s; visibility: visible;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 460 460&quot; style=&quot;width: 16px;height:16px;&quot; xml:space=&quot;preserve&quot;&gt;&lt;g&gt;&lt;path d=&quot;M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre id=&quot;pre119408&quot; data-allowshrink=&quot;True&quot; data-collapse=&quot;False&quot; data-codeblock-processed=&quot;true&quot; class=&quot;notranslate&quot; style=&quot;background-color: rgb(251, 237, 187); padding: 6px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-family: Consolas, monospace, mono; white-space: pre-wrap; overflow: auto; border: 1px solid rgb(251, 237, 187); tab-size: 4; overflow-wrap: break-word; word-break: break-word; margin-top: 0px;&quot;&gt;void&amp;nbsp;HelloWorldFrame::OnButton1Click(wxCommandEvent&amp;amp;&amp;nbsp;event)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Close();
}&lt;/pre&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;Close() 函数关闭窗口，因此现在当您再次编译时，您可以使用我们自己的按钮关闭窗口。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;这是最终结果&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;img height=&quot;540px&quot; src=&quot;https://www.codeproject.com/KB/cross-platform/803106/Final.PNG&quot; width=&quot;471px&quot; alt=&quot;图22&quot; data-src=&quot;/KB/cross-platform/803106/Final.PNG&quot; class=&quot;lazyautosizes lazyloaded&quot; data-sizes=&quot;auto&quot; data-srcset=&quot;/KB/cross-platform/803106/Final-r-400.PNG 400w, /KB/cross-platform/803106/Final.PNG 471w&quot; sizes=&quot;471px&quot; srcset=&quot;/KB/cross-platform/803106/Final-r-400.PNG 400w, /KB/cross-platform/803106/Final.PNG 471w&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; opacity: 1; transition: opacity 300ms ease 0s;&quot;/&gt;&lt;/p&gt;&lt;h3 style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 19px; line-height: 1.4; color: rgb(255, 153, 0); font-weight: normal; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;最后一些注意事项&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;如果您选择设计的任何资源，您可以在属性编辑器中看到的属性之一是尺寸（宽度和高度）和位置（x 和 y）变量。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;您可以为它们指定值，或者仅检查“默认大小”和“默认位置”选项，以便布局管理器为任何元素和窗口本身选择适当的位置和大小。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;对于我们将要制作的大部分程序来说，这是更好的开始选择。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;这是一个非常基础的教程。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;Mi的想法是制作更多教程来解释其他特性。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;不过你可以自己尝试一下，有很多资源可以使用。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.4; color: rgb(17, 17, 17); white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;欢迎任何建议、更正、疑问或意见。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;感谢您的阅读。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Sun, 26 Nov 2023 16:12:32 +0800</pubDate></item><item><title>简单的串行通信实用程序</title><link>https://175.es/blog/post/661.html</link><description>&lt;div class=&quot;header&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; color: rgb(17, 17, 17); font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;div id=&quot;ctl00_DescriptionSpot&quot; class=&quot;summary&quot; style=&quot;margin: 0px; padding: 25px 0px 15px; border: 0px; color: rgb(128, 128, 128);&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;一个简单的串行通信库，带有串行端口枚举器&lt;/span&gt;&lt;/div&gt;&lt;span id=&quot;ctl00_ThumbnailUrl&quot; class=&quot;date&quot; content=&quot;https://www.codeproject.com/KB/cpp/812710/Thumbnail.PNG&quot; style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div id=&quot;contentdiv&quot; class=&quot;text&quot; style=&quot;margin: 0px; padding: 10px 0px 0px; border: 0px; color: rgb(17, 17, 17); font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;ul class=&quot;download list-paddingleft-2&quot; style=&quot;margin-top: 25px; margin-bottom: 10px; padding: 0px 0px 0px 40px; border: 0px;&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.codeproject.com/KB/cpp/812710/SerialExample.rar&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; text-decoration-line: none; color: rgb(0, 87, 130);&quot;&gt;下载串行示例 - 602.1 KB&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.codeproject.com/KB/cpp/812710/rs232.rar&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; text-decoration-line: none; color: rgb(0, 87, 130);&quot;&gt;下载 rs232 - 3.9 KB&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://www.codeproject.com/KB/cpp/812710/lisports.rar&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; text-decoration-line: none; color: rgb(0, 87, 130);&quot;&gt;下载lisports - 6.4 KB&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 style=&quot;font-size: 29px; line-height: 1.4; color: rgb(255, 153, 0); margin: 20px 0px 11px; padding: 0px 0px 10px; font-weight: 400;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;介绍&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;line-height: 1.4;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;在嵌入式设计中，需要与 PC 进行通信的通道是很常见的。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;最简单的方法是串行通信，因为每个微控制器都有 UART 端口来与外界进行串行通信。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;但在计算机上，这并不总是那么容易。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 1.4;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;在这里，我提出了一个非常简单的串行通信库，具有非阻塞读取和不依赖事件的功能，这可能是一个优势，具体取决于我们需要的软件类型。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 1.4;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;除此之外，我还提供了一个非常有用的串行端口枚举器，以及一个简单的&lt;/span&gt;&lt;code style=&quot;margin: 0px; padding: 0px; border: 0px; color: rgb(153, 0, 0); font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Consolas, monospace, mono;&quot;&gt;Timer&amp;nbsp;&lt;/code&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;类，它允许我们测量间隔并自动执行一些操作。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;此类&lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;margin: 0px; padding: 0px; border: 0px; color: rgb(153, 0, 0); font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Consolas, monospace, mono;&quot;&gt;timer&amp;nbsp;&lt;/code&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;不是事件驱动的，因此您必须轮询间隔的状态以了解是否该执行某些操作。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 1.4;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;在以后的文章中，我将解释如何使用事件驱动的计时器来真正实现功能的自动化。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;但就目前而言，这个简单的功能&lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;margin: 0px; padding: 0px; border: 0px; color: rgb(153, 0, 0); font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Consolas, monospace, mono;&quot;&gt;timer&amp;nbsp;&lt;/code&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;对于我们的应用程序来说已经足够了。&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;font-size: 29px; line-height: 1.4; color: rgb(255, 153, 0); margin: 20px 0px 11px; padding: 0px 0px 10px; font-weight: 400;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;使用代码&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;line-height: 1.4;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;在代码中，我使用三个独立的库。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;一种用于串行通信，一种用于计时，一种用于 PC 中可用端口的摘要。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;我分别上传每个库以及使用它们的示例项目。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 19px; line-height: 1.4; color: rgb(255, 153, 0); font-weight: normal;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;RS232库&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;line-height: 1.4;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;该库为 PC 的 COM 端口带来了简单易用的界面。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;标题提供了这些功能：&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;pre-lang&quot; id=&quot;premain750582&quot; style=&quot;margin: 5px 0px 0px; padding: 4px 8px; border-width: 0px 0px 1px; border-top-style: initial; border-right-style: initial; border-bottom-style: solid; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-bottom-color: rgb(255, 208, 68); border-left-color: initial; border-image: initial; display: flex !important; background-color: rgb(251, 237, 187); justify-content: space-between; color: rgb(153, 153, 153);&quot;&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;C++&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; font-size: 13px;&quot;&gt;&lt;span class=&quot;code-collapse&quot; data-index=&quot;750582&quot; id=&quot;preShrink750582&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; cursor: pointer; transition: color 0.1s linear 0s;&quot;&gt;收缩▲&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span id=&quot;copycode750582&quot; class=&quot;copy-code&quot; data-index=&quot;750582&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; cursor: pointer; transition: color 0.1s linear 0s; visibility: visible;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 460 460&quot; style=&quot;width: 16px;height:16px;&quot; xml:space=&quot;preserve&quot;&gt;&lt;g&gt;&lt;path d=&quot;M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre id=&quot;pre750582&quot; class=&quot;lang-cplusplus notranslate&quot; data-language=&quot;C++&quot; data-allowshrink=&quot;True&quot; data-collapse=&quot;False&quot; data-codeblock-processed=&quot;true&quot; style=&quot;color: rgb(0, 0, 0); background-color: rgb(251, 237, 187); padding: 6px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Consolas, monospace, mono; white-space: pre-wrap; overflow: auto; border: 1px solid rgb(251, 237, 187); tab-size: 4; overflow-wrap: break-word; word-break: break-word; margin-top: 0px;&quot;&gt;#ifndef&amp;nbsp;rs232_INCLUDED#define&amp;nbsp;rs232_INCLUDED#ifdef&amp;nbsp;__cplusplusextern&amp;nbsp;&amp;quot;C&amp;quot;&amp;nbsp;{#endif#include&amp;nbsp;&amp;lt;stdio.h&amp;gt;#include&amp;nbsp;&amp;lt;string.h&amp;gt;#ifdef&amp;nbsp;__linux__#include&amp;nbsp;&amp;lt;termios.h&amp;gt;#include&amp;nbsp;&amp;lt;sys/ioctl.h&amp;gt;#include&amp;nbsp;&amp;lt;unistd.h&amp;gt;#include&amp;nbsp;&amp;lt;fcntl.h&amp;gt;#include&amp;nbsp;&amp;lt;sys/types.h&amp;gt;#include&amp;nbsp;&amp;lt;sys/stat.h&amp;gt;#include&amp;nbsp;&amp;lt;limits.h&amp;gt;#else#include&amp;nbsp;&amp;lt;windows.h&amp;gt;#endifint&amp;nbsp;RS232_OpenComport(int,&amp;nbsp;int);int&amp;nbsp;RS232_PollComport(int,&amp;nbsp;unsigned&amp;nbsp;char&amp;nbsp;*,&amp;nbsp;int);int&amp;nbsp;RS232_SendByte(int,&amp;nbsp;unsigned&amp;nbsp;char);int&amp;nbsp;RS232_SendBuf(int,&amp;nbsp;unsigned&amp;nbsp;char&amp;nbsp;*,&amp;nbsp;int);void&amp;nbsp;RS232_CloseComport(int);void&amp;nbsp;RS232_cputs(int,&amp;nbsp;const&amp;nbsp;char&amp;nbsp;*);int&amp;nbsp;RS232_IsDCDEnabled(int);int&amp;nbsp;RS232_IsCTSEnabled(int);int&amp;nbsp;RS232_IsDSREnabled(int);void&amp;nbsp;RS232_enableDTR(int);void&amp;nbsp;RS232_disableDTR(int);void&amp;nbsp;RS232_enableRTS(int);void&amp;nbsp;RS232_disableRTS(int);#ifdef&amp;nbsp;__cplusplus}&amp;nbsp;/*&amp;nbsp;extern&amp;nbsp;&amp;quot;C&amp;quot;&amp;nbsp;*/#endif#endif&lt;/pre&gt;&lt;p style=&quot;line-height: 1.4;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;该库由 Teunis van Beelen 编写，更多信息请&lt;/span&gt;&lt;a href=&quot;http://www.teuniz.net/RS-232/&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; text-decoration-line: none; color: rgb(0, 87, 130);&quot;&gt;参见此处&lt;/a&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 19px; line-height: 1.4; color: rgb(255, 153, 0); font-weight: normal;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;Com 端口枚举器&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;line-height: 1.4;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;该库提供了一种枚举 PC 中可用串行端口的简单方法。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;它并不完美，但效果很好。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;pre-lang&quot; id=&quot;premain893601&quot; style=&quot;margin: 5px 0px 0px; padding: 4px 8px; border-width: 0px 0px 1px; border-top-style: initial; border-right-style: initial; border-bottom-style: solid; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-bottom-color: rgb(255, 208, 68); border-left-color: initial; border-image: initial; display: flex !important; background-color: rgb(251, 237, 187); justify-content: space-between; color: rgb(153, 153, 153);&quot;&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;C++&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; font-size: 13px;&quot;&gt;&lt;span class=&quot;code-collapse&quot; data-index=&quot;893601&quot; id=&quot;preShrink893601&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; cursor: pointer; transition: color 0.1s linear 0s;&quot;&gt;收缩▲&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span id=&quot;copycode893601&quot; class=&quot;copy-code&quot; data-index=&quot;893601&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; cursor: pointer; transition: color 0.1s linear 0s; visibility: visible;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 460 460&quot; style=&quot;width: 16px;height:16px;&quot; xml:space=&quot;preserve&quot;&gt;&lt;g&gt;&lt;path d=&quot;M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre id=&quot;pre893601&quot; class=&quot;lang-cplusplus notranslate&quot; data-language=&quot;C++&quot; data-allowshrink=&quot;True&quot; data-collapse=&quot;False&quot; data-codeblock-processed=&quot;true&quot; style=&quot;color: rgb(0, 0, 0); background-color: rgb(251, 237, 187); padding: 6px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Consolas, monospace, mono; white-space: pre-wrap; overflow: auto; border: 1px solid rgb(251, 237, 187); tab-size: 4; overflow-wrap: break-word; word-break: break-word; margin-top: 0px;&quot;&gt;#ifndef&amp;nbsp;LISTPORTS_H#define&amp;nbsp;LISTPORTS_H#define&amp;nbsp;VERSION_LISTPORTS&amp;nbsp;0x00020000#ifdef&amp;nbsp;__cplusplusextern&amp;nbsp;&amp;quot;C&amp;quot;{#endif#include&amp;nbsp;&amp;lt;windows.h&amp;gt;typedef&amp;nbsp;struct{
&amp;nbsp;&amp;nbsp;LPCTSTR&amp;nbsp;lpPortName;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*&amp;nbsp;&amp;quot;COM1&amp;quot;,&amp;nbsp;etc.&amp;nbsp;*/
&amp;nbsp;&amp;nbsp;LPCTSTR&amp;nbsp;lpFriendlyName;&amp;nbsp;/*&amp;nbsp;Suitable&amp;nbsp;to&amp;nbsp;describe&amp;nbsp;the&amp;nbsp;port,&amp;nbsp;as&amp;nbsp;for&amp;nbsp;&amp;nbsp;*/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*&amp;nbsp;instance&amp;nbsp;&amp;quot;Infrared&amp;nbsp;serial&amp;nbsp;port&amp;nbsp;(COM4)&amp;quot;&amp;nbsp;*/
&amp;nbsp;&amp;nbsp;LPCTSTR&amp;nbsp;lpTechnology;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*&amp;nbsp;&amp;quot;BIOS&amp;quot;,&amp;quot;INFRARED&amp;quot;,&amp;quot;USB&amp;quot;,&amp;nbsp;etc.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*/}LISTPORTS_PORTINFO;typedef&amp;nbsp;BOOL&amp;nbsp;(CALLBACK*&amp;nbsp;LISTPORTS_CALLBACK)(LPVOID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;lpCallbackValue,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LISTPORTS_PORTINFO*&amp;nbsp;lpPortInfo);/*&amp;nbsp;User&amp;nbsp;provided&amp;nbsp;callback&amp;nbsp;funtion&amp;nbsp;that&amp;nbsp;receives&amp;nbsp;the&amp;nbsp;information&amp;nbsp;on&amp;nbsp;each
&amp;nbsp;*&amp;nbsp;serial&amp;nbsp;port&amp;nbsp;available.
&amp;nbsp;*&amp;nbsp;The&amp;nbsp;strings&amp;nbsp;provided&amp;nbsp;on&amp;nbsp;the&amp;nbsp;LISTPORTS_INFO&amp;nbsp;are&amp;nbsp;not&amp;nbsp;to&amp;nbsp;be&amp;nbsp;referenced&amp;nbsp;after
&amp;nbsp;*&amp;nbsp;the&amp;nbsp;callback&amp;nbsp;returns;&amp;nbsp;instead&amp;nbsp;make&amp;nbsp;copies&amp;nbsp;of&amp;nbsp;them&amp;nbsp;for&amp;nbsp;later&amp;nbsp;use.
&amp;nbsp;*&amp;nbsp;If&amp;nbsp;the&amp;nbsp;callback&amp;nbsp;returns&amp;nbsp;FALSE,&amp;nbsp;port&amp;nbsp;enumeration&amp;nbsp;is&amp;nbsp;aborted.
&amp;nbsp;*/BOOL&amp;nbsp;ListPorts(LISTPORTS_CALLBACK&amp;nbsp;lpCallback,LPVOID&amp;nbsp;lpCallbackValue);/*&amp;nbsp;Lists&amp;nbsp;serial&amp;nbsp;ports&amp;nbsp;available&amp;nbsp;on&amp;nbsp;the&amp;nbsp;system,&amp;nbsp;passing&amp;nbsp;the&amp;nbsp;information&amp;nbsp;on
&amp;nbsp;*&amp;nbsp;each&amp;nbsp;port&amp;nbsp;on&amp;nbsp;succesive&amp;nbsp;calls&amp;nbsp;to&amp;nbsp;lpCallback.
&amp;nbsp;*&amp;nbsp;lpCallbackValue,&amp;nbsp;treated&amp;nbsp;opaquely&amp;nbsp;by&amp;nbsp;ListPorts(),&amp;nbsp;is&amp;nbsp;intended&amp;nbsp;to&amp;nbsp;carry
&amp;nbsp;*&amp;nbsp;information&amp;nbsp;internal&amp;nbsp;to&amp;nbsp;the&amp;nbsp;callback&amp;nbsp;routine.
&amp;nbsp;*&amp;nbsp;Returns&amp;nbsp;TRUE&amp;nbsp;if&amp;nbsp;succesful,&amp;nbsp;otherwise&amp;nbsp;error&amp;nbsp;code&amp;nbsp;can&amp;nbsp;be&amp;nbsp;retrieved&amp;nbsp;via
&amp;nbsp;*&amp;nbsp;GetLastError().
&amp;nbsp;*/#ifdef&amp;nbsp;__cplusplus}#endif#elif&amp;nbsp;VERSION_LISTPORTS!=0x00020000#error&amp;nbsp;You&amp;nbsp;have&amp;nbsp;included&amp;nbsp;two&amp;nbsp;LISTPORTS.H&amp;nbsp;with&amp;nbsp;different&amp;nbsp;version&amp;nbsp;numbers#endif&lt;/pre&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;要使用它，只需在代码中定义您想要对列出的端口执行的操作&lt;/span&gt;&lt;div class=&quot;pre-lang&quot; id=&quot;premain494474&quot; style=&quot;margin: 5px 0px 0px; padding: 4px 8px; border-width: 0px 0px 1px; border-top-style: initial; border-right-style: initial; border-bottom-style: solid; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-bottom-color: rgb(255, 208, 68); border-left-color: initial; border-image: initial; display: flex !important; background-color: rgb(251, 237, 187); justify-content: space-between; color: rgb(153, 153, 153);&quot;&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;C++&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; font-size: 13px;&quot;&gt;&lt;span id=&quot;copycode494474&quot; class=&quot;copy-code&quot; data-index=&quot;494474&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; cursor: pointer; transition: color 0.1s linear 0s; visibility: visible;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 460 460&quot; style=&quot;width: 16px;height:16px;&quot; xml:space=&quot;preserve&quot;&gt;&lt;g&gt;&lt;path d=&quot;M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre id=&quot;pre494474&quot; class=&quot;lang-cplusplus notranslate&quot; data-language=&quot;C++&quot; data-allowshrink=&quot;True&quot; data-collapse=&quot;False&quot; data-codeblock-processed=&quot;true&quot; style=&quot;color: rgb(0, 0, 0); background-color: rgb(251, 237, 187); padding: 6px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Consolas, monospace, mono; white-space: pre-wrap; overflow: auto; border: 1px solid rgb(251, 237, 187); tab-size: 4; overflow-wrap: break-word; word-break: break-word; margin-top: 0px;&quot;&gt;typedef&amp;nbsp;BOOL&amp;nbsp;(CALLBACK*&amp;nbsp;LISTPORTS_CALLBACK)(LPVOID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;lpCallbackValue,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LISTPORTS_PORTINFO*&amp;nbsp;lpPortInfo);&lt;/pre&gt;&lt;p style=&quot;line-height: 1.4;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;定义。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;在示例中，我提供：&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;pre-lang&quot; id=&quot;premain491715&quot; style=&quot;margin: 5px 0px 0px; padding: 4px 8px; border-width: 0px 0px 1px; border-top-style: initial; border-right-style: initial; border-bottom-style: solid; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-bottom-color: rgb(255, 208, 68); border-left-color: initial; border-image: initial; display: flex !important; background-color: rgb(251, 237, 187); justify-content: space-between; color: rgb(153, 153, 153);&quot;&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;C++&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; font-size: 13px;&quot;&gt;&lt;span id=&quot;copycode491715&quot; class=&quot;copy-code&quot; data-index=&quot;491715&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; cursor: pointer; transition: color 0.1s linear 0s; visibility: visible;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 460 460&quot; style=&quot;width: 16px;height:16px;&quot; xml:space=&quot;preserve&quot;&gt;&lt;g&gt;&lt;path d=&quot;M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre id=&quot;pre491715&quot; class=&quot;lang-cplusplus notranslate&quot; data-language=&quot;C++&quot; data-allowshrink=&quot;True&quot; data-collapse=&quot;False&quot; data-codeblock-processed=&quot;true&quot; style=&quot;color: rgb(0, 0, 0); background-color: rgb(251, 237, 187); padding: 6px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Consolas, monospace, mono; white-space: pre-wrap; overflow: auto; border: 1px solid rgb(251, 237, 187); tab-size: 4; overflow-wrap: break-word; word-break: break-word; margin-top: 0px;&quot;&gt;string&amp;nbsp;comPorts[4];&amp;nbsp;//&amp;nbsp;Vector&amp;nbsp;containing&amp;nbsp;available&amp;nbsp;portsint&amp;nbsp;port_cnt=0;/*&amp;nbsp;Callback&amp;nbsp;function&amp;nbsp;that&amp;nbsp;list&amp;nbsp;the&amp;nbsp;available&amp;nbsp;ports&amp;nbsp;*/static&amp;nbsp;BOOL&amp;nbsp;CALLBACK&amp;nbsp;callback(LPVOID&amp;nbsp;lpCallbackValue,LISTPORTS_PORTINFO*&amp;nbsp;lpPortInfo)
{
&amp;nbsp;&amp;nbsp;_tprintf(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;TEXT(&amp;quot;\&amp;quot;%s\&amp;quot;&amp;nbsp;\&amp;quot;%s\&amp;quot;&amp;nbsp;\&amp;quot;%s\&amp;quot;\n&amp;quot;),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;lpPortInfo-&amp;gt;lpPortName,lpPortInfo-&amp;gt;lpTechnology,lpPortInfo-&amp;gt;lpFriendlyName);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;comPorts[port_cnt]&amp;nbsp;=&amp;nbsp;lpPortInfo-&amp;gt;lpPortName;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;port_cnt++;&amp;nbsp;&amp;nbsp;return&amp;nbsp;TRUE;
}&lt;/pre&gt;&lt;p style=&quot;line-height: 1.4;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;该库由 Joaquín Mª López Muñoz 编写。&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;font-size: 29px; line-height: 1.4; color: rgb(255, 153, 0); margin: 20px 0px 11px; padding: 0px 0px 10px; font-weight: 400;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;这个例子&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;line-height: 1.4;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;该示例只是一个控制台应用程序，模拟一个非常简单的终端，该终端发送一个字符或&lt;/span&gt;&lt;code style=&quot;margin: 0px; padding: 0px; border: 0px; color: rgb(153, 0, 0); font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Consolas, monospace, mono;&quot;&gt;string&amp;nbsp;&lt;/code&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;到端口广告以显示连接到它的设备的响应。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;它是使用&lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;margin: 0px; padding: 0px; border: 0px; color: rgb(153, 0, 0); font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Consolas, monospace, mono;&quot;&gt;Code::Blocks&amp;nbsp;&lt;/code&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;Windows 7 编写的。&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;pre-lang&quot; id=&quot;premain729351&quot; style=&quot;margin: 5px 0px 0px; padding: 4px 8px; border-width: 0px 0px 1px; border-top-style: initial; border-right-style: initial; border-bottom-style: solid; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-bottom-color: rgb(255, 208, 68); border-left-color: initial; border-image: initial; display: flex !important; background-color: rgb(251, 237, 187); justify-content: space-between; color: rgb(153, 153, 153);&quot;&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;C++&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; font-size: 13px;&quot;&gt;&lt;span class=&quot;code-collapse&quot; data-index=&quot;729351&quot; id=&quot;preShrink729351&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; cursor: pointer; transition: color 0.1s linear 0s;&quot;&gt;收缩▲&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span id=&quot;copycode729351&quot; class=&quot;copy-code&quot; data-index=&quot;729351&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; cursor: pointer; transition: color 0.1s linear 0s; visibility: visible;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 460 460&quot; style=&quot;width: 16px;height:16px;&quot; xml:space=&quot;preserve&quot;&gt;&lt;g&gt;&lt;path d=&quot;M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre id=&quot;pre729351&quot; class=&quot;lang-cplusplus notranslate&quot; data-language=&quot;C++&quot; data-allowshrink=&quot;True&quot; data-collapse=&quot;False&quot; data-codeblock-processed=&quot;true&quot; style=&quot;color: rgb(0, 0, 0); background-color: rgb(251, 237, 187); padding: 6px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Consolas, monospace, mono; white-space: pre-wrap; overflow: auto; border: 1px solid rgb(251, 237, 187); tab-size: 4; overflow-wrap: break-word; word-break: break-word; margin-top: 0px;&quot;&gt;#include&amp;nbsp;&amp;lt;iostream&amp;gt;#include&amp;nbsp;&amp;quot;rs232.h&amp;quot;#include&amp;nbsp;&amp;quot;timerclass.h&amp;quot;#include&amp;nbsp;&amp;quot;listports.h&amp;quot;#include&amp;nbsp;&amp;lt;tchar.h&amp;gt;using&amp;nbsp;namespace&amp;nbsp;std;

string&amp;nbsp;comPorts[4];&amp;nbsp;//&amp;nbsp;Vector&amp;nbsp;containing&amp;nbsp;available&amp;nbsp;portsint&amp;nbsp;port_cnt=0;/*&amp;nbsp;Definition&amp;nbsp;of&amp;nbsp;the&amp;nbsp;Callback&amp;nbsp;function&amp;nbsp;that&amp;nbsp;list&amp;nbsp;the&amp;nbsp;available&amp;nbsp;ports&amp;nbsp;*/static&amp;nbsp;BOOL&amp;nbsp;CALLBACK&amp;nbsp;callback(LPVOID&amp;nbsp;lpCallbackValue,LISTPORTS_PORTINFO*&amp;nbsp;lpPortInfo)
{
&amp;nbsp;&amp;nbsp;_tprintf(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;TEXT(&amp;quot;\&amp;quot;%s\&amp;quot;&amp;nbsp;\&amp;quot;%s\&amp;quot;&amp;nbsp;\&amp;quot;%s\&amp;quot;\n&amp;quot;),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;lpPortInfo-&amp;gt;lpPortName,lpPortInfo-&amp;gt;lpTechnology,lpPortInfo-&amp;gt;lpFriendlyName);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;comPorts[port_cnt]&amp;nbsp;=&amp;nbsp;lpPortInfo-&amp;gt;lpPortName;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;port_cnt++;&amp;nbsp;&amp;nbsp;return&amp;nbsp;TRUE;
}int&amp;nbsp;main(int&amp;nbsp;argc,&amp;nbsp;char*&amp;nbsp;argv[])
{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int&amp;nbsp;n;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;unsigned&amp;nbsp;char&amp;nbsp;buf[4096];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int&amp;nbsp;cport_nr&amp;nbsp;=&amp;nbsp;4;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int&amp;nbsp;bdrate&amp;nbsp;=&amp;nbsp;9600;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//unsigned&amp;nbsp;char&amp;nbsp;outBuffer[128];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string&amp;nbsp;outBuffer;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ListPorts(callback,NULL);&amp;nbsp;//Calling&amp;nbsp;to&amp;nbsp;the&amp;nbsp;list&amp;nbsp;ports&amp;nbsp;function
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;&amp;quot;Available&amp;nbsp;ports:&amp;nbsp;&amp;quot;&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;endl;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(int&amp;nbsp;i=0;&amp;nbsp;i&amp;lt;port_cnt;&amp;nbsp;i++)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;(i+1)&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;&amp;quot;:&amp;nbsp;&amp;quot;&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;comPorts[i]&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;endl&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;&amp;quot;Choose&amp;nbsp;a&amp;nbsp;port&amp;nbsp;&amp;quot;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cin&amp;nbsp;&amp;gt;&amp;gt;&amp;nbsp;cport_nr;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cport_nr--;&amp;nbsp;//&amp;nbsp;according&amp;nbsp;to&amp;nbsp;rs232.h,&amp;nbsp;the&amp;nbsp;port&amp;nbsp;numbers&amp;nbsp;start&amp;nbsp;on&amp;nbsp;0&amp;nbsp;for&amp;nbsp;COM1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(RS232_OpenComport(cport_nr,&amp;nbsp;bdrate))&amp;nbsp;//Open&amp;nbsp;the&amp;nbsp;port&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;&amp;quot;Can&amp;nbsp;not&amp;nbsp;open&amp;nbsp;com&amp;nbsp;port&amp;nbsp;&amp;quot;&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;comPorts[cport_nr];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return(0);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;while(1)
&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//n&amp;nbsp;=&amp;nbsp;RS232_PollComport(cport_nr,&amp;nbsp;buf,&amp;nbsp;4095);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;&amp;quot;Type&amp;nbsp;message&amp;nbsp;to&amp;nbsp;send&amp;quot;&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;endl&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;&amp;quot;Type&amp;nbsp;&amp;#39;quit&amp;#39;&amp;nbsp;to&amp;nbsp;exit&amp;quot;&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cin&amp;nbsp;&amp;gt;&amp;gt;&amp;nbsp;outBuffer;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(outBuffer&amp;nbsp;==&amp;nbsp;&amp;quot;quit&amp;quot;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RS232_CloseComport(cport_nr);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;0;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RS232_SendBuf(cport_nr,&amp;nbsp;(unsigned&amp;nbsp;char*)&amp;nbsp;outBuffer.c_str(),&amp;nbsp;outBuffer.size());

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Sleep(100);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;n&amp;nbsp;=&amp;nbsp;RS232_PollComport(cport_nr,&amp;nbsp;buf,&amp;nbsp;4096);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(n&amp;gt;0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;buf[n]=0;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;&amp;quot;Received:&amp;nbsp;&amp;quot;&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;buf&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;endl&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;buf[0]=0;

&amp;nbsp;&amp;nbsp;}
}&lt;/pre&gt;&lt;p style=&quot;line-height: 1.4;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;包含库之后是端口列表器的回调函数的定义。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;它显示可用的端口并将其名称存储在&lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;margin: 0px; padding: 0px; border: 0px; color: rgb(153, 0, 0); font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Consolas, monospace, mono;&quot;&gt;string&lt;/code&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 1.4;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;然后在&lt;/span&gt;&lt;code style=&quot;margin: 0px; padding: 0px; border: 0px; color: rgb(153, 0, 0); font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Consolas, monospace, mono;&quot;&gt;main&amp;nbsp;&lt;/code&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;函数中，首先调用该&lt;/span&gt;&lt;code style=&quot;margin: 0px; padding: 0px; border: 0px; color: rgb(153, 0, 0); font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Consolas, monospace, mono;&quot;&gt;ListPort&amp;nbsp;&lt;/code&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;函数并再次显示可用端口。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;询问所需的端口并尝试打开它。&lt;/span&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;如果端口打开，程序将进入无限循环，直到用户键入“退出”。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 1.4;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;在循环中，程序要求发送消息并将其放在 COM 端口上。&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;pre-lang&quot; id=&quot;premain156935&quot; style=&quot;margin: 5px 0px 0px; padding: 4px 8px; border-width: 0px 0px 1px; border-top-style: initial; border-right-style: initial; border-bottom-style: solid; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-bottom-color: rgb(255, 208, 68); border-left-color: initial; border-image: initial; display: flex !important; background-color: rgb(251, 237, 187); justify-content: space-between; color: rgb(153, 153, 153);&quot;&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;C++&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; font-size: 13px;&quot;&gt;&lt;span id=&quot;copycode156935&quot; class=&quot;copy-code&quot; data-index=&quot;156935&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; cursor: pointer; transition: color 0.1s linear 0s; visibility: visible;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 460 460&quot; style=&quot;width: 16px;height:16px;&quot; xml:space=&quot;preserve&quot;&gt;&lt;g&gt;&lt;path d=&quot;M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre id=&quot;pre156935&quot; class=&quot;lang-cplusplus notranslate&quot; data-language=&quot;C++&quot; data-allowshrink=&quot;True&quot; data-collapse=&quot;False&quot; data-codeblock-processed=&quot;true&quot; style=&quot;color: rgb(0, 0, 0); background-color: rgb(251, 237, 187); padding: 6px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Consolas, monospace, mono; white-space: pre-wrap; overflow: auto; border: 1px solid rgb(251, 237, 187); tab-size: 4; overflow-wrap: break-word; word-break: break-word; margin-top: 0px;&quot;&gt;RS232_SendBuf(cport_nr,&amp;nbsp;(unsigned&amp;nbsp;char*)&amp;nbsp;outBuffer.c_str(),&amp;nbsp;outBuffer.size());&lt;/pre&gt;&lt;p style=&quot;line-height: 1.4;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;等待 100 毫秒并轮询端口以获取响应：&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;pre-lang&quot; id=&quot;premain2366&quot; style=&quot;margin: 5px 0px 0px; padding: 4px 8px; border-width: 0px 0px 1px; border-top-style: initial; border-right-style: initial; border-bottom-style: solid; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-bottom-color: rgb(255, 208, 68); border-left-color: initial; border-image: initial; display: flex !important; background-color: rgb(251, 237, 187); justify-content: space-between; color: rgb(153, 153, 153);&quot;&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;C++&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; font-size: 13px;&quot;&gt;&lt;span id=&quot;copycode2366&quot; class=&quot;copy-code&quot; data-index=&quot;2366&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; cursor: pointer; transition: color 0.1s linear 0s; visibility: visible;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 460 460&quot; style=&quot;width: 16px;height:16px;&quot; xml:space=&quot;preserve&quot;&gt;&lt;g&gt;&lt;path d=&quot;M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre id=&quot;pre2366&quot; class=&quot;lang-cplusplus notranslate&quot; data-language=&quot;C++&quot; data-allowshrink=&quot;True&quot; data-collapse=&quot;False&quot; data-codeblock-processed=&quot;true&quot; style=&quot;color: rgb(0, 0, 0); background-color: rgb(251, 237, 187); padding: 6px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Consolas, monospace, mono; white-space: pre-wrap; overflow: auto; border: 1px solid rgb(251, 237, 187); tab-size: 4; overflow-wrap: break-word; word-break: break-word; margin-top: 0px;&quot;&gt;n&amp;nbsp;=&amp;nbsp;RS232_PollComport(cport_nr,&amp;nbsp;buf,&amp;nbsp;4096);&lt;/pre&gt;&lt;p style=&quot;line-height: 1.4;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;如果有任何消息，则会显示在屏幕上：&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;pre-lang&quot; id=&quot;premain797634&quot; style=&quot;margin: 5px 0px 0px; padding: 4px 8px; border-width: 0px 0px 1px; border-top-style: initial; border-right-style: initial; border-bottom-style: solid; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-bottom-color: rgb(255, 208, 68); border-left-color: initial; border-image: initial; display: flex !important; background-color: rgb(251, 237, 187); justify-content: space-between; color: rgb(153, 153, 153);&quot;&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;C++&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;pre-action-link&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; font-size: 13px;&quot;&gt;&lt;span id=&quot;copycode797634&quot; class=&quot;copy-code&quot; data-index=&quot;797634&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; cursor: pointer; transition: color 0.1s linear 0s; visibility: visible;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 460 460&quot; style=&quot;width: 16px;height:16px;&quot; xml:space=&quot;preserve&quot;&gt;&lt;g&gt;&lt;path d=&quot;M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre id=&quot;pre797634&quot; class=&quot;lang-cplusplus notranslate&quot; data-language=&quot;C++&quot; data-allowshrink=&quot;True&quot; data-collapse=&quot;False&quot; data-codeblock-processed=&quot;true&quot; style=&quot;color: rgb(0, 0, 0); background-color: rgb(251, 237, 187); padding: 6px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Consolas, monospace, mono; white-space: pre-wrap; overflow: auto; border: 1px solid rgb(251, 237, 187); tab-size: 4; overflow-wrap: break-word; word-break: break-word; margin-top: 0px;&quot;&gt;if(n&amp;gt;0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;buf[n]=0;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;&amp;quot;Received:&amp;nbsp;&amp;quot;&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;buf&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;endl&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/pre&gt;&lt;p style=&quot;line-height: 1.4;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; border: 0px; vertical-align: inherit;&quot;&gt;在捕获过程中，与充当回声器的 Arduino 板进行通信。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 1.4;&quot;&gt;&lt;img width=&quot;677&quot; height=&quot;325&quot; src=&quot;https://www.codeproject.com/KB/cpp/812710/Captura1.PNG&quot; alt=&quot;图1&quot; class=&quot;lazyautosizes ls-is-cached lazyloaded&quot; data-sizes=&quot;auto&quot; data-srcset=&quot;/KB/cpp/812710/Captura1-r-400.PNG 400w, /KB/cpp/812710/Captura1.PNG 677w&quot; sizes=&quot;677px&quot; srcset=&quot;/KB/cpp/812710/Captura1-r-400.PNG 400w, /KB/cpp/812710/Captura1.PNG 677w&quot; style=&quot;margin: 0px; padding: 0px; border: 0px; opacity: 1; transition: opacity 300ms ease 0s;&quot;/&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Sun, 26 Nov 2023 16:11:05 +0800</pubDate></item><item><title>install-qt5-from-sources-centos7</title><link>https://175.es/blog/post/660.html</link><description>&lt;table data-hpc=&quot;&quot; class=&quot;highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file&quot; data-tab-size=&quot;8&quot; data-paste-markdown-skip=&quot;&quot; data-tagsearch-lang=&quot;Shell&quot; data-tagsearch-path=&quot;install-qt5-from-sources-centos7.sh&quot; width=&quot;-129&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box&quot;&gt;&lt;tr style=&quot;box-sizing: border-box&quot; class=&quot;firstRow&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC1&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box; padding-top: 0px; padding-bottom: 0px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace; font-size: 12px; color: var(--fgColor-default, var(--color-fg-default)); overflow-wrap: anywhere; white-space: pre; word-break: break-all;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: transparent&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC2&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;#&lt;/span&gt; - Make sure you have a recent GCC compiler supporting, at least, C++11&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC3&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: transparent&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC4&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;#&lt;/span&gt; install dependencies&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC5&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;sudo yum install libxcb libxcb-devel xcb-util xcb-util-devel libxkbcommon-devel libxkbcommon-x11-devel&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: transparent&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC6&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;sudo yum install xcb-util-image-devel xcb-util-keysyms-devel xcb-util-renderutil-devel xcb-util-wm-devel&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC7&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;#&lt;/span&gt; install MESA libs if you don&amp;#39;t have NVidia drivers installed&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: transparent&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC8&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;#&lt;/span&gt;sudo yum install mesa-libGL-devel&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC9&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: transparent&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC10&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;#&lt;/span&gt; get the code and extract&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC11&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;wget http://download.qt.io/official_releases/qt/5.15/5.15.0/single/qt-everywhere-src-5.15.0.tar.xz&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: transparent&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC12&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;tar -xvf qt-everywhere-src-5.15.0.tar.xz&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC13&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;#&lt;/span&gt; out-of-source build&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: transparent&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC14&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;mkdir buildqt5&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC15&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-constant)&quot;&gt;cd&lt;/span&gt; buildqt5&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: transparent&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC16&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;../qt-everywhere-src-5.15.0/configure -opensource -confirm-license -xcb -xcb-xlib -bundled-xcb-xinput&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC17&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;make -j&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: transparent&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC18&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;#&lt;/span&gt; Install Qt5. By default, it will be installed under `/usr/local/Qt-5.15.0`.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC19&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;#&lt;/span&gt; (Reconfigure the build with ./configure -prefix=&amp;lt;path&amp;gt; if you want to install it into another folder)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: transparent&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC20&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;sudo make install&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC21&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: transparent&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC22&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;#&lt;/span&gt; Now, in order to use the newly installed Qt5, you have to instruct the environemnt to use it.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC23&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-keyword)&quot;&gt;export&lt;/span&gt; PATH=/usr/local/Qt-5.15.0/bin:&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-storage-modifier-import)&quot;&gt;$PATH&lt;/span&gt; &amp;nbsp;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;#&lt;/span&gt; for bash shell&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: transparent&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC24&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC25&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;#&lt;/span&gt; Test&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: transparent&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC26&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;qmake --version&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC27&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;#&lt;/span&gt; You should see:&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: transparent&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC28&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;#&lt;/span&gt; &amp;nbsp; &amp;nbsp;QMake version 3.1&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC29&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;#&lt;/span&gt; &amp;nbsp; &amp;nbsp;Using Qt version 5.15.0 in /usr/local/Qt-5.15.0/lib&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: transparent&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC30&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC31&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;#&lt;/span&gt; Notes:&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: transparent&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC32&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;#&lt;/span&gt; - if you want to rebuild Qt5, make sure you clean the build folder first (or create a new build folder); &lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC33&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;#&lt;/span&gt; otherwise, the build is misconfigured and you get compilation errors or missing files in the installation &lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: transparent&quot;&gt;&lt;td id=&quot;file-install-qt5-from-sources-centos7-sh-LC34&quot; class=&quot;blob-code blob-code-inner js-file-line&quot; style=&quot;box-sizing: border-box;padding-top: 0px;padding-bottom: 0px;position: relative;line-height: 20px;vertical-align: top;overflow: visible;font-family: ui-monospace, SFMono-Regular, &amp;#39;SF Mono&amp;#39;, Menlo, Consolas, &amp;#39;Liberation Mono&amp;#39;, monospace;font-size: 12px;color: var(--fgColor-default, var(--color-fg-default));overflow-wrap: anywhere;white-space: pre&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;&lt;span style=&quot;box-sizing: border-box;color: var(--color-prettylights-syntax-comment)&quot;&gt;#&lt;/span&gt; (a missing `qmake` from the `/usr/local/Qt-5.15.0/bin` installation folder is a symptom of that...)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;a name=&quot;comments&quot; style=&quot;box-sizing: border-box;background-color: rgb(255, 255, 255);color: var(--fgColor-accent, var(--color-accent-fg));font-family: -apple-system, BlinkMacSystemFont, &amp;#39;Segoe UI&amp;#39;, &amp;#39;Noto Sans&amp;#39;, Helvetica, Arial, sans-serif, &amp;#39;Apple Color Emoji&amp;#39;, &amp;#39;Segoe UI Emoji&amp;#39;;text-wrap: wrap&quot;&gt;&lt;/a&gt;&lt;span class=&quot;timeline-comment-avatar &quot; style=&quot;box-sizing: border-box;float: left;border-radius: 6px&quot;&gt;&lt;a data-hovercard-type=&quot;user&quot; data-hovercard-url=&quot;/users/chinamore/hovercard&quot; data-octo-click=&quot;hovercard-link-click&quot; data-octo-dimensions=&quot;link_type:self&quot; href=&quot;https://gist.github.com/chinamore&quot; style=&quot;box-sizing: border-box;background-color: transparent;display: inline-block !important&quot;&gt;&lt;img class=&quot;avatar avatar-user&quot; src=&quot;https://avatars.githubusercontent.com/u/43393345?s=80&amp;v=4&quot; width=&quot;40&quot; height=&quot;40&quot; alt=&quot;@chinamore&quot; style=&quot;box-sizing: border-box;border-style: none;background-color: var(--avatar-bgColor, var(--color-avatar-bg));border-radius: 50% !important;box-shadow: 0 0 0 1px var(--avatar-borderColor, var(--color-avatar-border));display: inline-block;flex-shrink: 0;line-height: 1;overflow: hidden;vertical-align: middle;width: 40px;height: 40px&quot;/&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;form class=&quot;js-new-comment-form js-needs-timeline-marker-header&quot; data-turbo=&quot;false&quot; action=&quot;https://gist.github.com/ric-bianchi/bc0bd0f1c41e46ea51b0b428fa306b2e/comments&quot; accept-charset=&quot;UTF-8&quot; method=&quot;post&quot; style=&quot;box-sizing: border-box&quot;&gt;&lt;tab-container class=&quot;js-previewable-comment-form write-selected previewable-comment-form&quot; data-preview-url=&quot;/preview?markdown_unsupported=false&amp;amp;subject=bc0bd0f1c41e46ea51b0b428fa306b2e&amp;amp;subject_type=Gist&quot; style=&quot;box-sizing: border-box;display: block;position: relative&quot;&gt;&lt;button type=&quot;button&quot; class=&quot;btn-link tabnav-tab write-tab js-write-tab px-3 px-sm-6 px-md-3 flex-1 flex-md-auto&quot; role=&quot;tab&quot; aria-selected=&quot;true&quot; tabindex=&quot;0&quot; style=&quot;font-style: inherit;font-variant: inherit;font-weight: inherit;font-stretch: inherit;font-size: var(--text-body-size-medium, 0.875rem);line-height: 23px;font-family: inherit;font-optical-sizing: inherit;font-kerning: inherit;font-feature-settings: inherit;font-variation-settings: inherit;overflow: visible;appearance: button;cursor: pointer;border-radius: var(--borderRadius-medium, 0.375rem) var(--borderRadius-medium, 0.375rem) 0 0;user-select: none;border-bottom-width: 0px;border-bottom-style: initial;border-color: var(--borderColor-default, var(--color-border-default));flex-shrink: 0;transition: color 0.2s cubic-bezier(0.3, 0, 0.5, 1) 0s;flex-grow: 1 !important;flex-basis: auto !important&quot;&gt;Write&lt;/button&gt;&amp;nbsp;&lt;button type=&quot;button&quot; class=&quot;btn-link tabnav-tab preview-tab js-preview-tab flex-1 flex-md-auto&quot; role=&quot;tab&quot; aria-selected=&quot;false&quot; tabindex=&quot;-1&quot; style=&quot;font-style: inherit;font-variant: inherit;font-weight: inherit;font-stretch: inherit;font-size: var(--text-body-size-medium, 0.875rem);line-height: 23px;font-family: inherit;font-optical-sizing: inherit;font-kerning: inherit;font-feature-settings: inherit;font-variation-settings: inherit;overflow: visible;appearance: button;cursor: pointer;border-radius: 0px;user-select: none;border-bottom: 0px;flex-shrink: 0;transition: color 0.2s cubic-bezier(0.3, 0, 0.5, 1) 0s;flex-grow: 1 !important;flex-basis: auto !important&quot;&gt;Preview&lt;/button&gt;&lt;markdown-toolbar role=&quot;toolbar&quot; aria-label=&quot;Composition&quot; for=&quot;new_comment_field&quot; data-view-component=&quot;true&quot; class=&quot;js-details-container Details toolbar-commenting no-wrap d-flex px-2 pt-2 pt-lg-0 flex-items-start flex-wrap mt-lg-2 border-md-top border-lg-top-0&quot; tabindex=&quot;0&quot; style=&quot;box-sizing: border-box;float: right;background: transparent;border-top: 0px !important;flex-wrap: wrap !important;align-items: flex-start !important;padding-top: 0px !important;text-wrap: nowrap !important;display: flex !important&quot;&gt;&lt;md-header aria-label=&quot;Heading&quot; id=&quot;md-heading-new_comment_field-1&quot; role=&quot;button&quot; tabindex=&quot;-1&quot; class=&quot;toolbar-item btn-octicon&quot; data-ga-click=&quot;Markdown Toolbar, click, header&quot; aria-describedby=&quot;tooltip-30d09753-320d-4008-8bc2-4b7019d4d00e&quot; style=&quot;box-sizing: border-box;display: block;padding: 4px;margin-left: 5px;line-height: 1;color: var(--fgColor-muted, var(--color-fg-muted));vertical-align: middle;background: transparent;border: 0px;box-shadow: none;float: left;cursor: pointer&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewbox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-heading&quot;&gt;&lt;path d=&quot;M3.75 2a.75.75 0 0 1 .75.75V7h7V2.75a.75.75 0 0 1 1.5 0v10.5a.75.75 0 0 1-1.5 0V8.5h-7v4.75a.75.75 0 0 1-1.5 0V2.75A.75.75 0 0 1 3.75 2Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/md-header&gt;&lt;md-bold aria-label=&quot;Bold&quot; id=&quot;md-bold-new_comment_field-1&quot; role=&quot;button&quot; tabindex=&quot;-1&quot; class=&quot;toolbar-item btn-octicon&quot; data-hotkey-scope=&quot;new_comment_field&quot; data-hotkey=&quot;Control+b&quot; data-ga-click=&quot;Markdown Toolbar, click, bold&quot; aria-describedby=&quot;tooltip-1b3ebd73-123d-4037-80d4-0fda48bb9d27&quot; style=&quot;box-sizing: border-box;display: block;padding: 4px;margin-left: 5px;line-height: 1;color: var(--fgColor-muted, var(--color-fg-muted));vertical-align: middle;background: transparent;border: 0px;box-shadow: none;float: left;cursor: pointer&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewbox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-bold&quot;&gt;&lt;path d=&quot;M4 2h4.5a3.501 3.501 0 0 1 2.852 5.53A3.499 3.499 0 0 1 9.5 14H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Zm1 7v3h4.5a1.5 1.5 0 0 0 0-3Zm3.5-2a1.5 1.5 0 0 0 0-3H5v3Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/md-bold&gt;&lt;md-italic aria-label=&quot;Italic&quot; id=&quot;md-italic-new_comment_field-1&quot; role=&quot;button&quot; tabindex=&quot;-1&quot; class=&quot;toolbar-item btn-octicon&quot; data-hotkey-scope=&quot;new_comment_field&quot; data-hotkey=&quot;Control+i&quot; data-ga-click=&quot;Markdown Toolbar, click, italic&quot; aria-describedby=&quot;tooltip-b5941e9d-7e73-4d25-846f-9c899ca75c0e&quot; style=&quot;box-sizing: border-box;display: block;padding: 4px;margin-left: 5px;line-height: 1;color: var(--fgColor-muted, var(--color-fg-muted));vertical-align: middle;background: transparent;border: 0px;box-shadow: none;float: left;cursor: pointer&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewbox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-italic&quot;&gt;&lt;path d=&quot;M6 2.75A.75.75 0 0 1 6.75 2h6.5a.75.75 0 0 1 0 1.5h-2.505l-3.858 9H9.25a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1 0-1.5h2.505l3.858-9H6.75A.75.75 0 0 1 6 2.75Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/md-italic&gt;&lt;md-quote aria-label=&quot;Quote&quot; id=&quot;md-quote-new_comment_field-1&quot; role=&quot;button&quot; tabindex=&quot;-1&quot; class=&quot;toolbar-item btn-octicon p-2 p-md-1&quot; data-hotkey-scope=&quot;new_comment_field&quot; data-hotkey=&quot;Control+Shift+.&quot; data-ga-click=&quot;Markdown Toolbar, click, quote&quot; aria-describedby=&quot;tooltip-cbab5c98-89bb-495f-806e-e83463c4e8d5&quot; style=&quot;box-sizing: border-box;display: block;padding: 4px;margin-left: 5px;line-height: 1;color: var(--fgColor-muted, var(--color-fg-muted));vertical-align: middle;background: transparent;border: 0px;box-shadow: none;float: left;cursor: pointer&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewbox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-quote&quot;&gt;&lt;path d=&quot;M1.75 2.5h10.5a.75.75 0 0 1 0 1.5H1.75a.75.75 0 0 1 0-1.5Zm4 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5Zm0 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5ZM2.5 7.75v6a.75.75 0 0 1-1.5 0v-6a.75.75 0 0 1 1.5 0Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/md-quote&gt;&lt;md-code aria-label=&quot;Code&quot; id=&quot;md-code-new_comment_field-1&quot; role=&quot;button&quot; tabindex=&quot;-1&quot; class=&quot;toolbar-item btn-octicon p-2 p-md-1&quot; data-hotkey-scope=&quot;new_comment_field&quot; data-hotkey=&quot;Control+e&quot; data-ga-click=&quot;Markdown Toolbar, click, code&quot; aria-describedby=&quot;tooltip-96fbf83a-cdf1-4d05-b7f9-3cbf19d58f91&quot; style=&quot;box-sizing: border-box;display: block;padding: 4px;margin-left: 5px;line-height: 1;color: var(--fgColor-muted, var(--color-fg-muted));vertical-align: middle;background: transparent;border: 0px;box-shadow: none;float: left;cursor: pointer&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewbox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-code&quot;&gt;&lt;path d=&quot;m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/md-code&gt;&lt;md-link aria-label=&quot;Link&quot; id=&quot;md-link-new_comment_field-2&quot; role=&quot;button&quot; tabindex=&quot;-1&quot; class=&quot;toolbar-item btn-octicon p-2 p-md-1 d-none d-md-block&quot; data-hotkey-scope=&quot;new_comment_field&quot; data-hotkey=&quot;Control+k&quot; data-ga-click=&quot;Markdown Toolbar, click, link&quot; aria-describedby=&quot;tooltip-1ad3d2ab-7218-4164-80be-23f5034a4976&quot; style=&quot;box-sizing: border-box;display: block;padding: 4px;margin-left: 5px;line-height: 1;color: var(--fgColor-muted, var(--color-fg-muted));vertical-align: middle;background: transparent;border: 0px;box-shadow: none;float: left;cursor: pointer&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewbox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-link&quot;&gt;&lt;path d=&quot;m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/md-link&gt;&lt;md-unordered-list aria-label=&quot;Unordered list&quot; id=&quot;md-unordered_list-new_comment_field-1&quot; role=&quot;button&quot; tabindex=&quot;-1&quot; class=&quot;toolbar-item btn-octicon&quot; data-hotkey-scope=&quot;new_comment_field&quot; data-hotkey=&quot;Control+Shift+8&quot; data-ga-click=&quot;Markdown Toolbar, click, unordered list&quot; aria-describedby=&quot;tooltip-07790f2e-9d25-4f6e-b8bb-d14710f540d9&quot; style=&quot;box-sizing: border-box;display: block;padding: 4px;margin-left: 5px;line-height: 1;color: var(--fgColor-muted, var(--color-fg-muted));vertical-align: middle;background: transparent;border: 0px;box-shadow: none;float: left;cursor: pointer&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewbox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-list-unordered&quot;&gt;&lt;path d=&quot;M5.75 2.5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5Zm0 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5Zm0 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5ZM2 14a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM2 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/md-unordered-list&gt;&lt;md-ordered-list aria-label=&quot;Numbered list&quot; id=&quot;md-ordered_list-new_comment_field-1&quot; role=&quot;button&quot; tabindex=&quot;-1&quot; class=&quot;toolbar-item btn-octicon&quot; data-hotkey-scope=&quot;new_comment_field&quot; data-hotkey=&quot;Control+Shift+7&quot; data-ga-click=&quot;Markdown Toolbar, click, ordered list&quot; aria-describedby=&quot;tooltip-003b06ac-f7e7-4a57-92ce-f6f0a3069b7c&quot; style=&quot;box-sizing: border-box;display: block;padding: 4px;margin-left: 5px;line-height: 1;color: var(--fgColor-muted, var(--color-fg-muted));vertical-align: middle;background: transparent;border: 0px;box-shadow: none;float: left;cursor: pointer&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewbox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-list-ordered&quot;&gt;&lt;path d=&quot;M5 3.25a.75.75 0 0 1 .75-.75h8.5a.75.75 0 0 1 0 1.5h-8.5A.75.75 0 0 1 5 3.25Zm0 5a.75.75 0 0 1 .75-.75h8.5a.75.75 0 0 1 0 1.5h-8.5A.75.75 0 0 1 5 8.25Zm0 5a.75.75 0 0 1 .75-.75h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1-.75-.75ZM.924 10.32a.5.5 0 0 1-.851-.525l.001-.001.001-.002.002-.004.007-.011c.097-.144.215-.273.348-.384.228-.19.588-.392 1.068-.392.468 0 .858.181 1.126.484.259.294.377.673.377 1.038 0 .987-.686 1.495-1.156 1.845l-.047.035c-.303.225-.522.4-.654.597h1.357a.5.5 0 0 1 0 1H.5a.5.5 0 0 1-.5-.5c0-1.005.692-1.52 1.167-1.875l.035-.025c.531-.396.8-.625.8-1.078a.57.57 0 0 0-.128-.376C1.806 10.068 1.695 10 1.5 10a.658.658 0 0 0-.429.163.835.835 0 0 0-.144.153ZM2.003 2.5V6h.503a.5.5 0 0 1 0 1H.5a.5.5 0 0 1 0-1h.503V3.308l-.28.14a.5.5 0 0 1-.446-.895l1.003-.5a.5.5 0 0 1 .723.447Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/md-ordered-list&gt;&lt;md-task-list aria-label=&quot;Task list&quot; id=&quot;md-task_list-new_comment_field-1&quot; role=&quot;button&quot; tabindex=&quot;-1&quot; class=&quot;toolbar-item btn-octicon&quot; data-hotkey-scope=&quot;new_comment_field&quot; data-hotkey=&quot;Control+Shift+l&quot; data-ga-click=&quot;Markdown Toolbar, click, task list&quot; aria-describedby=&quot;tooltip-4ec05c6d-40d0-46ad-ada6-941d8dbf61c2&quot; style=&quot;box-sizing: border-box;display: block;padding: 4px;margin-left: 5px;line-height: 1;color: var(--fgColor-muted, var(--color-fg-muted));vertical-align: middle;background: transparent;border: 0px;box-shadow: none;float: left;cursor: pointer&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewbox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-tasklist&quot;&gt;&lt;path d=&quot;M2 2h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Zm4.655 8.595a.75.75 0 0 1 0 1.06L4.03 14.28a.75.75 0 0 1-1.06 0l-1.5-1.5a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l.97.97 2.095-2.095a.75.75 0 0 1 1.06 0ZM9.75 2.5h5.5a.75.75 0 0 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5Zm0 5h5.5a.75.75 0 0 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5Zm0 5h5.5a.75.75 0 0 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5Zm-7.25-9v3h3v-3Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/md-task-list&gt;&lt;md-mention aria-label=&quot;Mention&quot; role=&quot;button&quot; id=&quot;md-mention-new_comment_field&quot; tabindex=&quot;-1&quot; class=&quot;flex-auto text-center toolbar-item btn-octicon p-2 p-md-1 mx-1&quot; data-ga-click=&quot;Markdown Toolbar, click, mention&quot; aria-describedby=&quot;tooltip-bddb5484-408b-46d5-b1b6-95a0684c52f4&quot; style=&quot;box-sizing: border-box;display: block;padding: 4px;line-height: 1;color: var(--fgColor-muted, var(--color-fg-muted));vertical-align: middle;background: transparent;border: 0px;box-shadow: none;flex: 1 1 auto !important;text-align: center !important;float: left;cursor: pointer&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewbox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-mention&quot;&gt;&lt;path d=&quot;M4.75 2.37a6.501 6.501 0 0 0 6.5 11.26.75.75 0 0 1 .75 1.298A7.999 7.999 0 0 1 .989 4.148 8 8 0 0 1 16 7.75v1.5a2.75 2.75 0 0 1-5.072 1.475 3.999 3.999 0 0 1-6.65-4.19A4 4 0 0 1 12 8v1.25a1.25 1.25 0 0 0 2.5 0V7.867a6.5 6.5 0 0 0-9.75-5.496ZM10.5 8a2.5 2.5 0 1 0-5 0 2.5 2.5 0 0 0 5 0Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/md-mention&gt;&lt;md-ref role=&quot;button&quot; id=&quot;md-ref-new_comment_field&quot; aria-label=&quot;Issue or pull request reference&quot; tabindex=&quot;-1&quot; class=&quot;flex-auto text-center toolbar-item btn-octicon p-2 p-md-1 mx-1&quot; data-ga-click=&quot;Markdown Toolbar, click, reference&quot; aria-describedby=&quot;tooltip-3d0d2716-5f0f-49fe-acae-bfe0748071c3&quot; style=&quot;box-sizing: border-box;display: block;padding: 4px;line-height: 1;color: var(--fgColor-muted, var(--color-fg-muted));vertical-align: middle;background: transparent;border: 0px;box-shadow: none;flex: 1 1 auto !important;text-align: center !important;float: left;cursor: pointer&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewbox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-cross-reference&quot;&gt;&lt;path d=&quot;M2.75 3.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h4.5a.25.25 0 0 0 .25-.25v-2.5a.75.75 0 0 1 1.5 0v2.5A1.75 1.75 0 0 1 13.25 13H9.06l-2.573 2.573A1.458 1.458 0 0 1 4 14.543V13H2.75A1.75 1.75 0 0 1 1 11.25v-7.5C1 2.784 1.784 2 2.75 2h5.5a.75.75 0 0 1 0 1.5ZM16 1.25v4.146a.25.25 0 0 1-.427.177L14.03 4.03l-3.75 3.75a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l3.75-3.75-1.543-1.543A.25.25 0 0 1 11.604 1h4.146a.25.25 0 0 1 .25.25Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/md-ref&gt;&lt;/markdown-toolbar&gt;&lt;file-attachment class=&quot;js-upload-markdown-image is-default&quot; input=&quot;fc-new_comment_field&quot; role=&quot;tabpanel&quot; data-tab-container-no-tabstop=&quot;true&quot; data-subject-type=&quot;Gist&quot; data-subject-param=&quot;bc0bd0f1c41e46ea51b0b428fa306b2e&quot; data-upload-policy-url=&quot;/upload/policies/assets&quot; style=&quot;box-sizing: border-box;display: block&quot;&gt;&lt;text-expander keys=&quot;: @&quot; data-mention-url=&quot;/ric-bianchi/bc0bd0f1c41e46ea51b0b428fa306b2e/suggestions?target=user&quot; data-emoji-url=&quot;/ric-bianchi/bc0bd0f1c41e46ea51b0b428fa306b2e/suggestions&quot; style=&quot;box-sizing: border-box;display: block&quot;&gt;&lt;/text-expander&gt;&lt;/file-attachment&gt;&lt;/tab-container&gt;&lt;/form&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Sat, 14 Oct 2023 22:16:39 +0800</pubDate></item><item><title>外网动态NAS使用DDNS动态解析-----然后使用GODADDY跟踪IP实现顶级域名或者二级域名直接实时更新IP！</title><link>https://175.es/blog/post/659.html</link><description>&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;外网动态NAS使用DDNS动态解析-----然后使用GODADDY跟踪IP实现顶级域名或者二级域名直接实时更新IP！&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&amp;nbsp;1：起因 NAS建立起来一年多了，突然出现状况，顶级域名无法跟踪动态IP&amp;nbsp; &amp;nbsp; ?&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; NAS建立初期，我是用的是CENTOS7系统自建网盘，使用DDNS监测动态IP（外网电信）&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 然后将动态IP跟新实时使用API向GODDADDY更新A记录，爽了一年&amp;nbsp; !&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 突然2023年崩溃了，多方检查代码均无法更新A记录，结果排查：GFW（中国长城防火墙）&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 封锁了api.godaddy.com域名，导致服务器可以监测动态IP，
 &amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 但是无法使用API调用&amp;nbsp; &amp;nbsp; GODADDY的A记录解析外网IP，导致NAS掉线（假死）；&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&amp;nbsp;2：解决方案如下：
 &amp;nbsp; 对外网（动态IP）使用国内的动态DNS进行跟踪，&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 然后GODADDY这边使用CNAME到动态域名，完美解决！&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 原理如下：A记录指向IP，CNAME指向其他域名的IP，只要其他域名的IP发生变化也会更新IP！&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&amp;nbsp;3：截图1：&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;img src=&quot;https://175.es/blog/zb_users/upload/2023/08/20230829030239169324935979264.png&quot; style=&quot;float: left;&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://175.es/blog/zb_users/upload/2023/08/20230829030244169324936447321.png&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://175.es/blog/zb_users/upload/2023/08/20230829030247169324936749752.png&quot;/&gt;&lt;/p&gt;</description><pubDate>Tue, 29 Aug 2023 02:42:45 +0800</pubDate></item><item><title>在 CentOS 上启用快照并安装 FreeCAD</title><link>https://175.es/blog/post/658.html</link><description>Snap 是打包了所有依赖项的应用程序，可以通过单个构建在所有流行的 Linux 发行版上运行。它们会自动更新并优雅地回滚。

Snap 可以从Snap Store发现和安装，Snap Store 是一个拥有数百万用户的应用程序商店。


启用快照
Snap 适用于CentOS 7.6+和 Red Hat Enterprise Linux 7.6+，来自Extra Packages for Enterprise Linux (EPEL) 存储库。可以使用以下命令将 EPEL 存储库添加到您的系统：

sudo yum install epel-release
现在可以按如下方式安装 Snap：

sudo yum install snapd
安装后，需要启用管理主要 snap 通信套接字的 systemd单元：

sudo systemctl enable --now snapd.socket
要启用经典/var/lib/snapd/snap捕捉支持，请输入以下内容以在和之间创建符号链接/snap：

sudo ln -s /var/lib/snapd/snap /snap
注销并重新登录，或重新启动系统，以确保正确更新 snap 的路径。

安装 FreeCAD
要安装 FreeCAD，只需使用以下命令：

sudo snap install freecad</description><pubDate>Sun, 11 Jun 2023 00:05:58 +0800</pubDate></item><item><title>NEXTCLOUD错误  PHP zip 模块未安装。 BT面板解决方案【原创】</title><link>https://175.es/blog/post/657.html</link><description>&lt;h2 style=&quot;margin-top:0;margin-right:0;margin-bottom:12px;margin-left:0;text-indent:0;padding:0 0 0 0 ;text-align:center;vertical-align:baseline;line-height:28px&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-family: &amp;#39;Segoe UI&amp;#39;;color: #222222;letter-spacing: 0;font-size: 20px&quot;&gt;错误&lt;/span&gt;&lt;/strong&gt;&lt;/h2&gt;&lt;p style=&quot;margin-top:0;margin-right:0;margin-bottom:0;margin-left:24px;padding:0 0 0 0 ;text-align:center;vertical-align:baseline&quot;&gt;&lt;span style=&quot;font-family:Symbol;font-size:13px&quot;&gt;·&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding:0 0 0 0 ;text-align:center;vertical-align:baseline&quot;&gt;&lt;span style=&quot;font-family: &amp;#39;Segoe UI&amp;#39;;color: #222222;letter-spacing: 0;font-size: 14px&quot;&gt;PHP zip 模块未安装。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top:0;margin-right:0;margin-bottom:0;margin-left:24px;padding:0 0 0 0 ;text-align:center;vertical-align:baseline&quot;&gt;&lt;span style=&quot;font-family:Symbol;font-size:13px&quot;&gt;·&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding:0 0 0 0 ;text-align:center;vertical-align:baseline&quot;&gt;&lt;span style=&quot;font-family: &amp;#39;Segoe UI&amp;#39;;color: #222222;letter-spacing: 0;font-size: 14px&quot;&gt;请联系服务器管理员安装模块。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top:0;margin-right:0;margin-bottom:0;margin-left:24px;padding:0 0 0 0 ;text-align:center;vertical-align:baseline&quot;&gt;&lt;span style=&quot;font-family:Symbol;font-size:13px&quot;&gt;·&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top:0;margin-right:0;margin-bottom:0;margin-left:24px;padding:0 0 0 0 ;text-align:center;vertical-align:baseline&quot;&gt;&lt;span style=&quot;font-family:Symbol;font-size:13px&quot;&gt;·&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding:0 0 0 0 ;text-align:center;vertical-align:baseline&quot;&gt;&lt;span style=&quot;font-family: &amp;#39;Segoe UI&amp;#39;;color: #222222;letter-spacing: 0;font-size: 14px&quot;&gt;PHP 模块已经安装，但仍然显示未安装？&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top:0;margin-right:0;margin-bottom:0;margin-left:24px;padding:0 0 0 0 ;text-align:center;vertical-align:baseline&quot;&gt;&lt;span style=&quot;font-family:Symbol;font-size:13px&quot;&gt;·&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding:0 0 0 0 ;text-align:center;vertical-align:baseline&quot;&gt;&lt;span style=&quot;font-family: &amp;#39;Segoe UI&amp;#39;;color: #222222;letter-spacing: 0;font-size: 14px&quot;&gt;&lt;span style=&quot;font-family:Segoe UI&quot;&gt;请联系服务器管理员重启&lt;/span&gt; Web 服务器。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top:0;margin-right:0;margin-bottom:0;margin-left:24px;padding:0 0 0 0 ;text-align:center;vertical-align:baseline&quot;&gt;&lt;span style=&quot;font-family:Symbol;font-size:13px&quot;&gt;·&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;;font-family:宋体;font-size:14px&quot;&gt;我们使用&lt;/span&gt;&lt;span style=&quot;;font-family:宋体;font-size:14px&quot;&gt;&lt;span style=&quot;font-family:Calibri&quot;&gt;BT&lt;/span&gt;&lt;span style=&quot;font-family:宋体&quot;&gt;面板的情况下，以下使用&lt;/span&gt;&lt;span style=&quot;font-family:Calibri&quot;&gt;PHP8.1&lt;/span&gt;&lt;span style=&quot;font-family:宋体&quot;&gt;为例子说明方法&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;;font-family:宋体;font-size:14px&quot;&gt;我们要手动安装&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体;color: #4D4D4D;letter-spacing: 0;font-size: 16px;background: #FFFFFF&quot;&gt;&lt;span style=&quot;font-family:宋体&quot;&gt;第一条：&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial;color: #4D4D4D;letter-spacing: 0;font-size: 16px;background: #FFFFFF&quot;&gt;&lt;span style=&quot;font-family:Arial&quot;&gt;为&lt;/span&gt;php安装zip扩展&lt;/span&gt;&lt;a href=&quot;https://so.csdn.net/so/search?q=wget&amp;spm=1001.2101.3001.7020&quot;&gt;&lt;span style=&quot;font-family: Arial;color: #FC5531;letter-spacing: 0;font-size: 16px&quot;&gt;wget&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Arial;color: #4D4D4D;letter-spacing: 0;font-size: 16px;background: #FFFFFF&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://pecl.php.com/get/zip-1.13.5.tgz&quot;&gt;&lt;span style=&quot;text-decoration:underline;&quot;&gt;&lt;span style=&quot;font-family: Arial;color: #0000FF;letter-spacing: 0;font-size: 16px;background: #FFFFFF&quot;&gt;http://pecl.php.com/get/zip-1.13.5.tgz&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Arial;color: #4D4D4D;letter-spacing: 0;font-size: 16px;background: #FFFFFF&quot;&gt;&lt;span style=&quot;font-family:Arial&quot;&gt;第二条：&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial;color: #4D4D4D;letter-spacing: 0;font-size: 16px;background: #FFFFFF&quot;&gt;tar -zvxf zip-1.13.5.tgz&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体;color: #4D4D4D;letter-spacing: 0;font-size: 16px;background: #FFFFFF&quot;&gt;&lt;span style=&quot;font-family:宋体&quot;&gt;第三条：&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial;color: #4D4D4D;letter-spacing: 0;font-size: 16px;background: #FFFFFF&quot;&gt;cd zip-1.13.5&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体;color: #4D4D4D;letter-spacing: 0;font-size: 16px;background: #FFFFFF&quot;&gt;&lt;span style=&quot;font-family:宋体&quot;&gt;第四条：&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 宋体;color: #4D4D4D;letter-spacing: 0;font-size: 16px;background: #FFFFFF&quot;&gt;&lt;span style=&quot;font-family:Arial&quot;&gt;/www/server/php/81/bin/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial;color: #4D4D4D;letter-spacing: 0;font-size: 16px;background: #FFFFFF&quot;&gt;phpize&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体;color: #4D4D4D;letter-spacing: 0;font-size: 16px;background: #FFFFFF&quot;&gt;&lt;span style=&quot;font-family:宋体&quot;&gt;如果在这报错，根据&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 宋体;color: #4D4D4D;letter-spacing: 0;font-size: 16px;background: #FFFFFF&quot;&gt;&lt;span style=&quot;font-family:宋体&quot;&gt;错误检查，需要安装&lt;/span&gt;&lt;span style=&quot;font-family:Arial&quot;&gt;CMAKE&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体;color: #4D4D4D;letter-spacing: 0;font-size: 16px;background: #FFFFFF&quot;&gt;&lt;span style=&quot;font-family:宋体&quot;&gt;接下来&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体;color: #4D4D4D;letter-spacing: 0;font-size: 16px;background: #FFFFFF&quot;&gt;&lt;span style=&quot;font-family:Arial&quot;&gt;./configure --with-php-config=/www/server/php/81/bin/php-config&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top:0;margin-right:0;margin-bottom:16px;margin-left:0;text-indent:0;padding:0 0 0 0 ;line-height:24px;background:rgb(255,255,255)&quot;&gt;&lt;span style=&quot;font-family: Arial;color: #4D4D4D;letter-spacing: 0;font-size: 16px&quot;&gt;M&lt;/span&gt;&lt;span style=&quot;font-family: Arial;color: #4D4D4D;letter-spacing: 0;font-size: 16px&quot;&gt;ake&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top:0;margin-right:0;margin-bottom:16px;margin-left:0;text-indent:0;padding:0 0 0 0 ;line-height:24px;background:rgb(255,255,255)&quot;&gt;&lt;span style=&quot;font-family: Arial;color: #4D4D4D;letter-spacing: 0;font-size: 16px&quot;&gt;make install&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top:0;margin-right:0;margin-bottom:16px;margin-left:0;text-indent:0;padding:0 0 0 0 ;line-height:24px;background:rgb(255,255,255)&quot;&gt;&lt;span style=&quot;font-family: Arial;color: #4D4D4D;letter-spacing: 0;font-size: 16px&quot;&gt;&lt;span style=&quot;font-family:Arial&quot;&gt;然后修改&lt;/span&gt;php.ini,添加：extension=zip.so&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top:0;margin-right:0;margin-bottom:16px;margin-left:0;text-indent:0;padding:0 0 0 0 ;line-height:24px;background:rgb(255,255,255)&quot;&gt;&lt;span style=&quot;font-family: Arial;color: #4D4D4D;letter-spacing: 0;font-size: 16px&quot;&gt;&lt;span style=&quot;font-family:Arial&quot;&gt;重启&lt;/span&gt;apache&lt;/span&gt;&lt;span style=&quot;font-family: 宋体;color: #4D4D4D;letter-spacing: 0;font-size: 16px&quot;&gt;&lt;span style=&quot;font-family:宋体&quot;&gt;或者&lt;/span&gt;&lt;span style=&quot;font-family:Arial&quot;&gt;NGINX&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial;color: #4D4D4D;letter-spacing: 0;font-size: 16px&quot;&gt;&lt;span style=&quot;font-family:Arial&quot;&gt;，查看&lt;/span&gt;phpinfo是否安装成功&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top:0;margin-right:0;margin-bottom:16px;margin-left:0;text-indent:0;padding:0 0 0 0 ;line-height:24px;background:rgb(255,255,255)&quot;&gt;&lt;span style=&quot;font-family: Arial;color: #4D4D4D;letter-spacing: 0;font-size: 16px&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top:0;margin-right:0;margin-bottom:16px;margin-left:0;text-indent:0;padding:0 0 0 0 ;line-height:24px;background:rgb(255,255,255)&quot;&gt;&lt;span style=&quot;font-family: Arial;color: #4D4D4D;letter-spacing: 0;font-size: 16px&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top:0;margin-right:0;margin-bottom:16px;margin-left:0;text-indent:0;padding:0 0 0 0 ;line-height:24px;background:rgb(255,255,255)&quot;&gt;&lt;font color=&quot;#4d4d4d&quot; face=&quot;Arial&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;BT面板PHP 7.4&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;margin-top:0;margin-right:0;margin-bottom:16px;margin-left:0;text-indent:0;padding:0 0 0 0 ;line-height:24px;background:rgb(255,255,255)&quot;&gt;&lt;font color=&quot;#4d4d4d&quot; face=&quot;Arial&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;span style=&quot;color: #333333; font-family: arial, &amp;quot;Microsoft Yahei&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, sans-serif; font-size: 16px; background-color: #FFFFFF;&quot;&gt;说明libzip也没有被安装。因此需要先安装libzip。安装方法如下：&lt;/span&gt;&lt;br style=&quot;overflow-wrap: break-word; color: rgb(51, 51, 51); font-family: arial, &amp;quot;Microsoft Yahei&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;/&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;blockcode&quot; style=&quot;overflow-wrap: break-word; overflow: hidden; margin: 10px 0px; padding: 10px 0px 5px 10px; background: url(&amp;quot;https://www.bt.cn/bbs/static/image/common/codebg.gif&amp;quot;) 0px 0px repeat-y rgb(247, 247, 247); color: rgb(102, 102, 102); zoom: 1; border: 1px solid rgb(223, 223, 223); font-family: arial, &amp;quot;Microsoft Yahei&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;div id=&quot;code_uJJ&quot; style=&quot;overflow-wrap: break-word;&quot;&gt;&lt;ol style=&quot;overflow-wrap: break-word; margin-left: 10px !important; padding: 0px !important;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;wget https://libzip.org/download/libzip-1.9.2.tar.gz&lt;br style=&quot;overflow-wrap: break-word;&quot;/&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;tar -zxvf libzip-1.9.2.tar.gz&lt;br style=&quot;overflow-wrap: break-word;&quot;/&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;cd libzip-1.9.2&lt;br style=&quot;overflow-wrap: break-word;&quot;/&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;mkdir build &amp;amp;&amp;amp; cd build&lt;br style=&quot;overflow-wrap: break-word;&quot;/&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;cmake ..&lt;br style=&quot;overflow-wrap: break-word;&quot;/&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;make &amp;amp;&amp;amp; make install&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;span style=&quot;overflow-wrap: break-word; margin-left: 43px; font-size: 12px; cursor: pointer; color: #20A53A !important;&quot;&gt;复制代码&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;color: #333333; font-family: arial, &amp;quot;Microsoft Yahei&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, sans-serif; font-size: 16px; background-color: #FFFFFF;&quot;&gt;&lt;br style=&quot;box-sizing: border-box; color: rgb(108, 117, 125); font-family: Montserrat, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 13.2px; white-space: normal; background-color: rgb(255, 255, 255);&quot;/&gt;&lt;span style=&quot;color: #6C757D; font-family: Montserrat, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 13.2px; background-color: #FFFFFF;&quot;&gt;安装完成后，查看是否存在/usr/local/lib/pkgconfig目录,如果存在，执行如下命令来设置PKG_CONFIG_PATH：&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #333333; font-family: arial, &amp;quot;Microsoft Yahei&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, sans-serif; background-color: #FFFFFF; font-size: 16px;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;background-color: #FFFFFF; box-sizing: border-box; color: #569CD6; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; white-space: pre;&quot;&gt;export&lt;/span&gt;&lt;span style=&quot;color: #DCDCDC; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; white-space: pre; background-color: #1E1E1E;&quot;&gt; PKG_CONFIG_PATH=&lt;/span&gt;&lt;span class=&quot;hljs-string&quot; style=&quot;background-color: #FFFFFF; box-sizing: border-box; color: #D69D85; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; white-space: pre;&quot;&gt;&amp;quot;/usr/local/lib/pkgconfig/&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #333333; font-family: arial, &amp;quot;Microsoft Yahei&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, sans-serif; font-size: 16px; background-color: #FFFFFF;&quot;&gt;安装libzip完成后，才能进行PHPZIP扩展的安装（下面以PHP74为例）：&lt;/span&gt;&lt;br style=&quot;overflow-wrap: break-word; color: rgb(51, 51, 51); font-family: arial, &amp;quot;Microsoft Yahei&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;/&gt;&lt;/p&gt;&lt;div class=&quot;blockcode&quot; style=&quot;overflow-wrap: break-word; overflow: hidden; margin: 10px 0px; padding: 10px 0px 5px 10px; background: url(&amp;quot;https://www.bt.cn/bbs/static/image/common/codebg.gif&amp;quot;) 0px 0px repeat-y rgb(247, 247, 247); color: rgb(102, 102, 102); zoom: 1; border: 1px solid rgb(223, 223, 223); font-family: arial, &amp;quot;Microsoft Yahei&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;div id=&quot;code_N09&quot; style=&quot;overflow-wrap: break-word;&quot;&gt;&lt;ol style=&quot;overflow-wrap: break-word; margin-left: 10px !important; padding: 0px !important;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;cd /www/server/php/74/src/ext/zip/&lt;br style=&quot;overflow-wrap: break-word;&quot;/&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;/www/server/php/74/bin/phpize&lt;br style=&quot;overflow-wrap: break-word;&quot;/&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;./configure --with-php-config=/www/server/php/74/bin/php-config&lt;br style=&quot;overflow-wrap: break-word;&quot;/&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;make &amp;amp;&amp;amp; make install&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;span style=&quot;overflow-wrap: break-word; margin-left: 43px; font-size: 12px; cursor: pointer; color: #20A53A !important;&quot;&gt;复制代码&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;color: #333333; font-family: arial, &amp;quot;Microsoft Yahei&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, sans-serif; font-size: 16px; background-color: #FFFFFF;&quot;&gt;但是安装完成后，在配置文件php.ini中加入&lt;/span&gt;&lt;br style=&quot;overflow-wrap: break-word; color: rgb(51, 51, 51); font-family: arial, &amp;quot;Microsoft Yahei&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;/&gt;&lt;/p&gt;&lt;div class=&quot;blockcode&quot; style=&quot;overflow-wrap: break-word; overflow: hidden; margin: 10px 0px; padding: 10px 0px 5px 10px; background: url(&amp;quot;https://www.bt.cn/bbs/static/image/common/codebg.gif&amp;quot;) 0px 0px repeat-y rgb(247, 247, 247); color: rgb(102, 102, 102); zoom: 1; border: 1px solid rgb(223, 223, 223); font-family: arial, &amp;quot;Microsoft Yahei&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;div id=&quot;code_P6w&quot; style=&quot;overflow-wrap: break-word;&quot;&gt;&lt;ol style=&quot;overflow-wrap: break-word; margin-left: 10px !important; padding: 0px !important;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;extension = zip.so&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;span style=&quot;overflow-wrap: break-word; margin-left: 43px; font-size: 12px; cursor: pointer; color: #20A53A !important;&quot;&gt;复制代码&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;margin-top:0;margin-right:0;margin-bottom:16px;margin-left:0;text-indent:0;padding:0 0 0 0 ;line-height:24px;background:rgb(255,255,255)&quot;&gt;&lt;font color=&quot;#4d4d4d&quot; face=&quot;Arial&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;span style=&quot;color: #DCDCDC; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; white-space: pre; background-color: #1E1E1E; font-size: 16px;&quot;&gt;echo &lt;/span&gt;&lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #D69D85; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; white-space: pre; font-size: 16px;&quot;&gt;&amp;quot;extension = zip.so&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #DCDCDC; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; white-space: pre; background-color: #1E1E1E; font-size: 16px;&quot;&gt; &amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;hljs-regexp&quot; style=&quot;box-sizing: border-box; color: #9A5334; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; white-space: pre; font-size: 16px;&quot;&gt;/www/&lt;/span&gt;&lt;span style=&quot;color: #DCDCDC; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; white-space: pre; background-color: #1E1E1E; font-size: 16px;&quot;&gt;server/php/&lt;/span&gt;&lt;span class=&quot;hljs-number&quot; style=&quot;box-sizing: border-box; color: #B8D7A3; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; white-space: pre; font-size: 16px;&quot;&gt;74&lt;/span&gt;&lt;span style=&quot;color: #DCDCDC; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; white-space: pre; background-color: #1E1E1E; font-size: 16px;&quot;&gt;/etc/php.ini&lt;/span&gt;&lt;span style=&quot;color: #DCDCDC; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 11.55px; white-space: pre; background-color: #1E1E1E;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Sun, 04 Dec 2022 10:19:50 +0800</pubDate></item><item><title>Marlin 2 ‘bug ：X axis and axis layer offset</title><link>https://175.es/blog/post/656.html</link><description>&lt;p&gt;&lt;img src=&quot;https://175.es/blog/zb_users/upload/2021/05/202105031620005901488963.jpg&quot; style=&quot;&quot; title=&quot;11.jpg&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://175.es/blog/zb_users/upload/2021/05/202105031620005901774180.jpg&quot; style=&quot;&quot; title=&quot;10.jpg&quot;/&gt;&lt;/p&gt;&lt;p&gt;主板：MKS GEN L 2.1&lt;br/&gt;&lt;/p&gt;&lt;p&gt;MARLIN：bugfix-2.0.x&lt;/p&gt;&lt;p&gt;场景：当主板使用独立步进驱动器和混合伺服驱动器（HBS57）&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://175.es/blog/zb_users/upload/2021/05/202105031620005230490261.jpg&quot; title=&quot;9.jpg&quot; alt=&quot;9.jpg&quot;/&gt;&lt;/p&gt;&lt;p&gt;Motherboard: MKS GEN L 2.1&lt;/p&gt;&lt;p&gt;MARLIN: bugfix-2.0.x&lt;/p&gt;&lt;p&gt;Scenario: When the motherboard uses an independent stepper driver and a hybrid servo driver (HBS57)&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Mon, 03 May 2021 09:12:14 +0800</pubDate></item><item><title>3D打印机 打印对象始终倾斜</title><link>https://175.es/blog/post/655.html</link><description>&lt;p style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; margin-top: 0px; margin-bottom: 0px; color: rgb(0, 14, 26); font-family: &amp;quot;Noto Sans&amp;quot;, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;A专家：&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; margin-top: 0px; margin-bottom: 0px; color: rgb(0, 14, 26); font-family: &amp;quot;Noto Sans&amp;quot;, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;印刷品侧面的平缓倾斜可能是由于皮带轮在轴上滑动所致。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;您需要非常用力地拧紧螺钉，并使用永久性记号笔在皮带轮和轴上做一个记号，这样您就可以查看皮带轮是否打滑。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;检查所有皮带轮，包括电动机上的皮带轮。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; margin-top: 0px; margin-bottom: 0px; color: rgb(0, 14, 26); font-family: &amp;quot;Noto Sans&amp;quot;, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;较大的换档可能是由于同一原因引起的，也可能是由于快速动作较大以及电机跳步导致的。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;这可能是由于轴上的摩擦太大所致。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;关闭机器电源后，尝试用手指按下轴上的两个滑块，手动移动磁头。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;头部应该相当容易地移动，并且在两个方向上的压力相同。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;如果一根轴很难移动，请寻找任何可能引起摩擦的东西，例如顶杆不水平且彼此成直角。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;确保短皮带没有在框架上摩擦。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;另外，请检查端盖是否没有在轴的末端上紧紧地按两下。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;您还可以在轴上添加一点缝纫机油，以帮助所有部件平滑滑动。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;B专家&lt;br/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; margin-top: 0px; margin-bottom: 0px; color: rgb(0, 14, 26); font-family: &amp;quot;Noto Sans&amp;quot;, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;您要报告的内容（倾斜零件）对于新组装的机器非常普遍，并且通常易于修复。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;刚刚给您列出了最常见的原因。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;有98％的机会是其中之一。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;我只想阐述一个：&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; margin-top: 0px; margin-bottom: 0px; color: rgb(0, 14, 26); font-family: &amp;quot;Noto Sans&amp;quot;, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;blockquote data-ipsquote=&quot;&quot; class=&quot;ipsQuote&quot; data-ipsquote-contentapp=&quot;forums&quot; data-ipsquote-contenttype=&quot;forums&quot; data-ipsquote-contentid=&quot;2412&quot; data-ipsquote-contentclass=&quot;forums_Topic&quot; id=&quot;ips_uid_9986_3&quot; style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; margin: 0px; padding: var(--sp-4); position: relative; background-image: ; background-position-x: ; background-position-y: ; background-size: ; background-repeat-x: ; background-repeat-y: ; background-attachment: ; background-origin: ; background-clip: ; border-radius: var(--radius-1); clear: both; border-width: 0px 0px 0px 4px; color: rgb(0, 14, 26); font-family: &amp;quot;Noto Sans&amp;quot;, sans-serif; white-space: normal;&quot;&gt;&lt;div class=&quot;ipsQuote_citation ipsQuote_open&quot; style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; background-image: ; background-position-x: ; background-position-y: ; background-size: ; background-repeat-x: ; background-repeat-y: ; background-attachment: ; background-origin: ; background-clip: ; margin-bottom: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-top-right-radius: inherit; color: rgb( var(--theme-text_color) ); font-weight: bold; font-size: 13px; cursor: pointer;&quot;&gt;&lt;a href=&quot;https://community.ultimaker.com/topic/2412-printed-objects-are-always-tilt/#&quot; data-action=&quot;toggleQuote&quot; style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; text-decoration-line: none; cursor: pointer; vertical-align: middle; font-family: FontAwesome; font-size: 16px; margin-top: -3px; transition: opacity 0.2s ease-in-out 0s; display: inline-block; line-height: 1; opacity: 0.3;&quot;&gt;&amp;nbsp;&lt;/a&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;&amp;nbsp;引用&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; margin-top: 0px; margin-bottom: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;确保短皮带没有在框架上摩擦。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; margin-top: 0px; margin-bottom: 0px;&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;p style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; margin-top: 0px; margin-bottom: 0px; color: rgb(0, 14, 26); font-family: &amp;quot;Noto Sans&amp;quot;, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;这很明显，因为每次x轴或y轴移动方向（步进器切换方向）时，皮带都会以不同的方式（来回-来回）扭转。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;如果看到此内容，则说明它正在触摸框架。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;通常，一些垫圈作为垫片可以解决该特定问题。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; margin-top: 0px; margin-bottom: 0px; color: rgb(0, 14, 26); font-family: &amp;quot;Noto Sans&amp;quot;, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;我选择了此特定问题，因为对于像这样的特定渐进倾斜，它可能比其他问题更有可能。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;第二种可能是固定螺丝不够紧。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; margin-top: 0px; margin-bottom: 0px; color: rgb(0, 14, 26); font-family: &amp;quot;Noto Sans&amp;quot;, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; margin-top: 0px; margin-bottom: 0px; color: rgb(0, 14, 26); font-family: &amp;quot;Noto Sans&amp;quot;, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;C专家&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; margin-top: 0px; margin-bottom: 0px; color: rgb(0, 14, 26); font-family: &amp;quot;Noto Sans&amp;quot;, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; margin-top: 0px; margin-bottom: 0px; color: rgb(0, 14, 26); font-family: &amp;quot;Noto Sans&amp;quot;, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;皮带轮必须绝对紧紧。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;逐渐移动不是由皮带张力的差异引起的，而是由头部未针对每一层上的相同坐标返回相同的物理位置引起的。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;仅当电动机无法跟踪其位置，跳过步距或皮带轮物理移位时，才会发生这种情况。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;调整皮带张力可能会暂时减轻电动机上的压力，或者您可能在此之后重新拧紧皮带轮更好。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;但是，皮带张力并不是分层的根本原因。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;皮带张力问题可能会影响层中确切的位置精度，但不会导致层移位。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; margin-top: 0px; margin-bottom: 0px; color: rgb(0, 14, 26); font-family: &amp;quot;Noto Sans&amp;quot;, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;左后侧的两个滑轮彼此接触并不是问题（假设您的意思是同一根x轴杆上的滑轮）。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;他们应该随着杆的旋转而彼此锁定。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;他们应该没有办法彼此独立地相互干扰并“干涉”。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;实际上，两个皮带通道都可以切割成单个皮带轮组件。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; margin-top: 0px; margin-bottom: 0px; color: rgb(0, 14, 26); font-family: &amp;quot;Noto Sans&amp;quot;, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;拧紧所有皮带轮。&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;它们不得侧向移动，也不得独立于轴旋转，否则您将永远无法获得良好的打印效果。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; margin-top: 0px; margin-bottom: 0px; color: rgb(0, 14, 26); font-family: &amp;quot;Noto Sans&amp;quot;, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; margin-top: 0px; margin-bottom: 0px; color: rgb(0, 14, 26); font-family: &amp;quot;Noto Sans&amp;quot;, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;D专家(本人）&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; margin-top: 0px; margin-bottom: 0px; color: rgb(0, 14, 26); font-family: &amp;quot;Noto Sans&amp;quot;, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; vertical-align: inherit;&quot;&gt;皮带的角度不正，2个同步带之间存在不平，特别是同步带于接点位置不在一条线，存在皮带不直到情况下，也会发生这种故障&lt;br/&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; -webkit-font-smoothing: antialiased; margin-top: 0px; margin-bottom: 0px; color: rgb(0, 14, 26); font-family: &amp;quot;Noto Sans&amp;quot;, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Mon, 19 Apr 2021 16:03:55 +0800</pubDate></item></channel></rss>