#mermaid-svg-jIHLfO6hJfqea3zY .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-jIHLfO6hJfqea3zY .label text{fill:#333}#mermaid-svg-jIHLfO6hJfqea3zY .node rect,#mermaid-svg-jIHLfO6hJfqea3zY .node circle,#mermaid-svg-jIHLfO6hJfqea3zY .node ellipse,#mermaid-svg-jIHLfO6hJfqea3zY .node polygon,#mermaid-svg-jIHLfO6hJfqea3zY .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-jIHLfO6hJfqea3zY .node .label{text-align:center;fill:#333}#mermaid-svg-jIHLfO6hJfqea3zY .node.clickable{cursor:pointer}#mermaid-svg-jIHLfO6hJfqea3zY .arrowheadPath{fill:#333}#mermaid-svg-jIHLfO6hJfqea3zY .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-jIHLfO6hJfqea3zY .flowchart-link{stroke:#333;fill:none}#mermaid-svg-jIHLfO6hJfqea3zY .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-jIHLfO6hJfqea3zY .edgeLabel rect{opacity:0.9}#mermaid-svg-jIHLfO6hJfqea3zY .edgeLabel span{color:#333}#mermaid-svg-jIHLfO6hJfqea3zY .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-jIHLfO6hJfqea3zY .cluster text{fill:#333}#mermaid-svg-jIHLfO6hJfqea3zY div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-jIHLfO6hJfqea3zY .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-jIHLfO6hJfqea3zY text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-jIHLfO6hJfqea3zY .actor-line{stroke:grey}#mermaid-svg-jIHLfO6hJfqea3zY .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-jIHLfO6hJfqea3zY .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-jIHLfO6hJfqea3zY #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-jIHLfO6hJfqea3zY .sequenceNumber{fill:#fff}#mermaid-svg-jIHLfO6hJfqea3zY #sequencenumber{fill:#333}#mermaid-svg-jIHLfO6hJfqea3zY #crosshead path{fill:#333;stroke:#333}#mermaid-svg-jIHLfO6hJfqea3zY .messageText{fill:#333;stroke:#333}#mermaid-svg-jIHLfO6hJfqea3zY .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-jIHLfO6hJfqea3zY .labelText,#mermaid-svg-jIHLfO6hJfqea3zY .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-jIHLfO6hJfqea3zY .loopText,#mermaid-svg-jIHLfO6hJfqea3zY .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-jIHLfO6hJfqea3zY .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-jIHLfO6hJfqea3zY .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-jIHLfO6hJfqea3zY .noteText,#mermaid-svg-jIHLfO6hJfqea3zY .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-jIHLfO6hJfqea3zY .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-jIHLfO6hJfqea3zY .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-jIHLfO6hJfqea3zY .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-jIHLfO6hJfqea3zY .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-jIHLfO6hJfqea3zY .section{stroke:none;opacity:0.2}#mermaid-svg-jIHLfO6hJfqea3zY .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-jIHLfO6hJfqea3zY .section2{fill:#fff400}#mermaid-svg-jIHLfO6hJfqea3zY .section1,#mermaid-svg-jIHLfO6hJfqea3zY .section3{fill:#fff;opacity:0.2}#mermaid-svg-jIHLfO6hJfqea3zY .sectionTitle0{fill:#333}#mermaid-svg-jIHLfO6hJfqea3zY .sectionTitle1{fill:#333}#mermaid-svg-jIHLfO6hJfqea3zY .sectionTitle2{fill:#333}#mermaid-svg-jIHLfO6hJfqea3zY .sectionTitle3{fill:#333}#mermaid-svg-jIHLfO6hJfqea3zY .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-jIHLfO6hJfqea3zY .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-jIHLfO6hJfqea3zY .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-jIHLfO6hJfqea3zY .grid path{stroke-width:0}#mermaid-svg-jIHLfO6hJfqea3zY .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-jIHLfO6hJfqea3zY .task{stroke-width:2}#mermaid-svg-jIHLfO6hJfqea3zY .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-jIHLfO6hJfqea3zY .taskText:not([font-size]){font-size:11px}#mermaid-svg-jIHLfO6hJfqea3zY .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-jIHLfO6hJfqea3zY .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-jIHLfO6hJfqea3zY .task.clickable{cursor:pointer}#mermaid-svg-jIHLfO6hJfqea3zY .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-jIHLfO6hJfqea3zY .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-jIHLfO6hJfqea3zY .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-jIHLfO6hJfqea3zY .taskText0,#mermaid-svg-jIHLfO6hJfqea3zY .taskText1,#mermaid-svg-jIHLfO6hJfqea3zY .taskText2,#mermaid-svg-jIHLfO6hJfqea3zY .taskText3{fill:#fff}#mermaid-svg-jIHLfO6hJfqea3zY .task0,#mermaid-svg-jIHLfO6hJfqea3zY .task1,#mermaid-svg-jIHLfO6hJfqea3zY .task2,#mermaid-svg-jIHLfO6hJfqea3zY .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-jIHLfO6hJfqea3zY .taskTextOutside0,#mermaid-svg-jIHLfO6hJfqea3zY .taskTextOutside2{fill:#000}#mermaid-svg-jIHLfO6hJfqea3zY .taskTextOutside1,#mermaid-svg-jIHLfO6hJfqea3zY .taskTextOutside3{fill:#000}#mermaid-svg-jIHLfO6hJfqea3zY .active0,#mermaid-svg-jIHLfO6hJfqea3zY .active1,#mermaid-svg-jIHLfO6hJfqea3zY .active2,#mermaid-svg-jIHLfO6hJfqea3zY .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-jIHLfO6hJfqea3zY .activeText0,#mermaid-svg-jIHLfO6hJfqea3zY .activeText1,#mermaid-svg-jIHLfO6hJfqea3zY .activeText2,#mermaid-svg-jIHLfO6hJfqea3zY .activeText3{fill:#000 !important}#mermaid-svg-jIHLfO6hJfqea3zY .done0,#mermaid-svg-jIHLfO6hJfqea3zY .done1,#mermaid-svg-jIHLfO6hJfqea3zY .done2,#mermaid-svg-jIHLfO6hJfqea3zY .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-jIHLfO6hJfqea3zY .doneText0,#mermaid-svg-jIHLfO6hJfqea3zY .doneText1,#mermaid-svg-jIHLfO6hJfqea3zY .doneText2,#mermaid-svg-jIHLfO6hJfqea3zY .doneText3{fill:#000 !important}#mermaid-svg-jIHLfO6hJfqea3zY .crit0,#mermaid-svg-jIHLfO6hJfqea3zY .crit1,#mermaid-svg-jIHLfO6hJfqea3zY .crit2,#mermaid-svg-jIHLfO6hJfqea3zY .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-jIHLfO6hJfqea3zY .activeCrit0,#mermaid-svg-jIHLfO6hJfqea3zY .activeCrit1,#mermaid-svg-jIHLfO6hJfqea3zY .activeCrit2,#mermaid-svg-jIHLfO6hJfqea3zY .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-jIHLfO6hJfqea3zY .doneCrit0,#mermaid-svg-jIHLfO6hJfqea3zY .doneCrit1,#mermaid-svg-jIHLfO6hJfqea3zY .doneCrit2,#mermaid-svg-jIHLfO6hJfqea3zY .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-jIHLfO6hJfqea3zY .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-jIHLfO6hJfqea3zY .milestoneText{font-style:italic}#mermaid-svg-jIHLfO6hJfqea3zY .doneCritText0,#mermaid-svg-jIHLfO6hJfqea3zY .doneCritText1,#mermaid-svg-jIHLfO6hJfqea3zY .doneCritText2,#mermaid-svg-jIHLfO6hJfqea3zY .doneCritText3{fill:#000 !important}#mermaid-svg-jIHLfO6hJfqea3zY .activeCritText0,#mermaid-svg-jIHLfO6hJfqea3zY .activeCritText1,#mermaid-svg-jIHLfO6hJfqea3zY .activeCritText2,#mermaid-svg-jIHLfO6hJfqea3zY .activeCritText3{fill:#000 !important}#mermaid-svg-jIHLfO6hJfqea3zY .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-jIHLfO6hJfqea3zY g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-jIHLfO6hJfqea3zY g.classGroup text .title{font-weight:bolder}#mermaid-svg-jIHLfO6hJfqea3zY g.clickable{cursor:pointer}#mermaid-svg-jIHLfO6hJfqea3zY g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-jIHLfO6hJfqea3zY g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-jIHLfO6hJfqea3zY .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-jIHLfO6hJfqea3zY .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-jIHLfO6hJfqea3zY .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-jIHLfO6hJfqea3zY .dashed-line{stroke-dasharray:3}#mermaid-svg-jIHLfO6hJfqea3zY #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-jIHLfO6hJfqea3zY #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-jIHLfO6hJfqea3zY #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-jIHLfO6hJfqea3zY #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-jIHLfO6hJfqea3zY #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-jIHLfO6hJfqea3zY #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-jIHLfO6hJfqea3zY #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-jIHLfO6hJfqea3zY #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-jIHLfO6hJfqea3zY .commit-id,#mermaid-svg-jIHLfO6hJfqea3zY .commit-msg,#mermaid-svg-jIHLfO6hJfqea3zY .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-jIHLfO6hJfqea3zY .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-jIHLfO6hJfqea3zY .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-jIHLfO6hJfqea3zY g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-jIHLfO6hJfqea3zY g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-jIHLfO6hJfqea3zY g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-jIHLfO6hJfqea3zY g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-jIHLfO6hJfqea3zY g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-jIHLfO6hJfqea3zY g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-jIHLfO6hJfqea3zY .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-jIHLfO6hJfqea3zY .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-jIHLfO6hJfqea3zY .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-jIHLfO6hJfqea3zY .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-jIHLfO6hJfqea3zY .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-jIHLfO6hJfqea3zY .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-jIHLfO6hJfqea3zY .edgeLabel text{fill:#333}#mermaid-svg-jIHLfO6hJfqea3zY .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-jIHLfO6hJfqea3zY .node circle.state-start{fill:black;stroke:black}#mermaid-svg-jIHLfO6hJfqea3zY .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-jIHLfO6hJfqea3zY #statediagram-barbEnd{fill:#9370db}#mermaid-svg-jIHLfO6hJfqea3zY .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-jIHLfO6hJfqea3zY .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-jIHLfO6hJfqea3zY .statediagram-state .divider{stroke:#9370db}#mermaid-svg-jIHLfO6hJfqea3zY .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-jIHLfO6hJfqea3zY .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-jIHLfO6hJfqea3zY .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-jIHLfO6hJfqea3zY .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-jIHLfO6hJfqea3zY .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-jIHLfO6hJfqea3zY .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-jIHLfO6hJfqea3zY .note-edge{stroke-dasharray:5}#mermaid-svg-jIHLfO6hJfqea3zY .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-jIHLfO6hJfqea3zY .error-icon{fill:#522}#mermaid-svg-jIHLfO6hJfqea3zY .error-text{fill:#522;stroke:#522}#mermaid-svg-jIHLfO6hJfqea3zY .edge-thickness-normal{stroke-width:2px}#mermaid-svg-jIHLfO6hJfqea3zY .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-jIHLfO6hJfqea3zY .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-jIHLfO6hJfqea3zY .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-jIHLfO6hJfqea3zY .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-jIHLfO6hJfqea3zY .marker{fill:#333}#mermaid-svg-jIHLfO6hJfqea3zY .marker.cross{stroke:#333}:root { --mermaid-font-family: "trebuchet ms", verdana, arial;}#mermaid-svg-jIHLfO6hJfqea3zY {color: rgba(0, 0, 0, 0.75);font: ;}
依赖
依赖
依赖
程序A
动态链接库B
动态链接库C
...
当然有些自动化打包软件比如qt的windeployqt.exe,再比如python的pyinstaller ,但是这些工具只能将工具内包含的依赖环境自动打包,而系统环境下dll依赖不会自动打包到软件的运行路径,这里推荐depends.exe 自己观察依赖库文件都有哪些。depends的下载地址为:http://www.dependencywalker.com/
实际操作过程中,比如使用windeployqt打包的程序在当前Windows环境下是可以直接运行的,但是由于Windows环境不一样,比如更换电脑之后。所以需要将所需要的全部的dll文件全部拷贝到当前*.exe
运行的同一路径下或者exe所包含的所有路径下。
技巧是使用depends在进行开发的Windows环境下查看所依赖的dll,并且通过查看dll是否为系统路径下,如果是的话尽量拷贝到当前软件的运行路径下,当然也可以在目标上位机下,查看缺失什么dll文件,然后在进行开发的Windows环境下查看相应的位置并拷贝。
depends的软件界面如下,下面是拿我编写的influxdb qt工程的编译结果进行测试的,可以看出了该软件的全部依赖dll文件,并且可以查看所依赖dll本身依赖的库文件。对于Qt使用MySQL后打包程序出现的错误,我在博文打包Qt程序后调用MySQL时出现 QMYSQL driver not loaded进行了介绍,感兴趣的朋友可以关注一下。