久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

有沒有辦法用靜態 OpenSSL 構建靜態 Qt?

Is there any way to building static Qt with static OpenSSL?(有沒有辦法用靜態 OpenSSL 構建靜態 Qt?)
本文介紹了有沒有辦法用靜態 OpenSSL 構建靜態 Qt?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

原始問題略有不同,但屬于更重要問題的一部分.

Original question was slightly different but part of a more major question.

我正在嘗試在 Windows 上使用靜態 OpenSSL 將 Qt 5.2 構建為靜態的.

I am trying to build Qt 5.2 as static with static OpenSSL on Windows.

我的最終目標是發布單個二進制文件,而無需提供 libeay32.dll 和 ssleay32.dll.然而,在我看來這是不可能的.我使用靜態 openssl 庫構建了靜態 Qt,但似乎 Qt 完全忽略了提供的庫并始終搜索 DLL.

My final goal is to ship a single binary without the need to provide libeay32.dll and ssleay32.dll with it. However, it seems to me that this is impossible. I built static Qt with static openssl libs but it seems like Qt is outright ignoring the libs provided and always searches for DLLs.

這個答案還表明 QtNetwork 總是搜索 DLL 并忽略所有內容否則,但它也指出兩個選項是將 OpenSSL 編譯為 Qt...",但情況似乎并非如此.

This answer also suggests that QtNetwork always searches for DLLs and ignores everything else but it also states that "two options are to compile OpenSSL into Qt..." but this does not seem to be the case.

有人可以提供明確的答案嗎?

Can someone provide a definitive answer?

這是我的 Qt 配置(為了可讀性添加了換行符):

This is my Qt configure (line breaks added for readability):

configure -static -qmake -opensource -nomake examples -opengl desktop
-platform win32-msvc2010 -openssl -I C:gitopenssluildinclude
-L C:gitopenssluildlib OPENSSL_LIBS="-llibeay32 -lssleay32 -lgdi32"

推薦答案

有沒有辦法用靜態 OpenSSL 構建靜態 Qt?

Is there any way to building static Qt with static OpenSSL?

當然,你在配置Qt時需要使用以下選項:

Sure, you need to use the following option when configuring Qt:

-openssl-linked

原因是QtNetwork默認使用QLibrary類來動態打開庫以獲取必要的符號.

The reason is that QtNetwork uses the QLibrary class by default for dynamically opening the library to get the necessary symbols.

這是告訴Qt不要這樣做的選項,并尊重正常的鏈接規則.

This is the option to tell Qt not to do so, and respect the the normal linkage rules.

話雖如此,如果需要在沒有您參與的情況下為最終用戶提供安全更新,則不建議對 openssl 使用靜態鏈接.考慮一下,如果你離開了,不再從事這個項目,等等會發生什么.

That being said, it is not recommended to use static linkage for openssl if security updates need to be available for the end user without your involvement. Consider that for a moment what happens if you are gone, not working on this project anymore, etc.

此外,此設置未經過頻繁測試,因此您實際上可能會遇到一些應該在上游修復的問題,但這是針對相關用例的解決方案設計.

Also, this setup is not tested frequently, so you may actually encounter some issues that should be fixed upstream, but this is solution design for the use case in question.

免責聲明:由于 SO 是關于編程的,我忽略了對 Qt 靜態鏈接的許可后果,所以我想快速提醒您注意正確使用,以免陷入法律麻煩.

Disclaimer: since SO is about programming, I am ignoring the licensing consequences for static linking againt Qt, so I would just like to quickly remind that you that be aware of the proper usage not to get into legal troubles.

這篇關于有沒有辦法用靜態 OpenSSL 構建靜態 Qt?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

How can I read and manipulate CSV file data in C++?(如何在 C++ 中讀取和操作 CSV 文件數據?)
In C++ why can#39;t I write a for() loop like this: for( int i = 1, double i2 = 0; (在 C++ 中,為什么我不能像這樣編寫 for() 循環: for( int i = 1, double i2 = 0;)
How does OpenMP handle nested loops?(OpenMP 如何處理嵌套循環?)
Reusing thread in loop c++(在循環 C++ 中重用線程)
Precise thread sleep needed. Max 1ms error(需要精確的線程睡眠.最大 1ms 誤差)
Is there ever a need for a quot;do {...} while ( )quot; loop?(是否需要“do {...} while ()?環形?)
主站蜘蛛池模板: www亚洲免费国内精品 | 精品一区二区三区在线播放 | 欧美黑人又粗大 | 欧美a级成人淫片免费看 | 欧美啊v在线观看 | 日本福利在线 | 黄免费在线 | 国产一区二区三区在线 | 久婷婷 | av片在线观看 | 成人精品一区二区三区中文字幕 | 国产一区2区 | 中文字幕亚洲一区二区三区 | 日本精品一区二区三区在线观看视频 | www国产亚洲精品久久网站 | 国产精品一区二区在线免费观看 | 99国内精品| 国产九九九 | 成人免费看黄 | 日韩视频在线观看一区二区 | 国产精品久久久久久婷婷天堂 | 亚洲综合资源 | 国产成人综合一区二区三区 | h视频在线观看免费 | 精品1区2区| 日韩视频二区 | 999久久久久久久久 国产欧美在线观看 | 国产免费观看视频 | 午夜视频一区 | 午夜精品一区二区三区免费视频 | 国产精品国产三级国产aⅴ中文 | 天天玩天天干天天操 | 99福利视频 | 91国内精品久久 | 欧美日本一区 | 国产欧美三区 | 亚洲成人av在线播放 | 日本不卡视频在线播放 | 亚洲国产精品一区二区久久 | 国产成人精品一区二区 | 色婷婷在线视频 |