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

有沒有辦法用靜態(tài) OpenSSL 構(gòu)建靜態(tài) Qt?

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

問題描述

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

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

我正在嘗試在 Windows 上使用靜態(tài) OpenSSL 將 Qt 5.2 構(gòu)建為靜態(tài)的.

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

我的最終目標是發(fā)布單個二進制文件,而無需提供 libeay32.dll 和 ssleay32.dll.然而,在我看來這是不可能的.我使用靜態(tài) openssl 庫構(gòu)建了靜態(tài) 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 并忽略所有內(nèi)容否則,但它也指出兩個選項是將 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"

推薦答案

有沒有辦法用靜態(tài) OpenSSL 構(gòu)建靜態(tài) Qt?

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

當(dāng)然,你在配置Qt時需要使用以下選項:

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

-openssl-linked

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

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

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

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

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

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.

此外,此設(shè)置未經(jīng)過頻繁測試,因此您實際上可能會遇到一些應(yīng)該在上游修復(fù)的問題,但這是針對相關(guān)用例的解決方案設(shè)計.

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.

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

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.

這篇關(guān)于有沒有辦法用靜態(tài) OpenSSL 構(gòu)建靜態(tài) Qt?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

相關(guān)文檔推薦

How can I read and manipulate CSV file data in C++?(如何在 C++ 中讀取和操作 CSV 文件數(shù)據(jù)?)
In C++ why can#39;t I write a for() loop like this: for( int i = 1, double i2 = 0; (在 C++ 中,為什么我不能像這樣編寫 for() 循環(huán): for( int i = 1, double i2 = 0;)
How does OpenMP handle nested loops?(OpenMP 如何處理嵌套循環(huán)?)
Reusing thread in loop c++(在循環(huán) C++ 中重用線程)
Precise thread sleep needed. Max 1ms error(需要精確的線程睡眠.最大 1ms 誤差)
Is there ever a need for a quot;do {...} while ( )quot; loop?(是否需要“do {...} while ()?環(huán)形?)
主站蜘蛛池模板: 黄色一级大片在线免费看产 | 久久久久国产一区二区三区四区 | 亚洲国产成人av好男人在线观看 | 欧美一级黄色片 | 99re视频这里只有精品 | 中文字幕在线第一页 | 最新黄色在线观看 | 在线午夜 | 中文字幕国 | 国产精品成人一区二区三区夜夜夜 | 久久噜噜噜精品国产亚洲综合 | 欧美日韩一 | 国产精品福利视频 | 久久精品国产a三级三级三级 | 国产成人免费 | 亚洲不卡在线观看 | 成人午夜视频在线观看 | 天天操 天天操 | 欧美性受 | 国产精品视频一区二区三区, | 亚洲欧洲成人在线 | 一本一道久久a久久精品蜜桃 | av在线播放一区二区 | 精品一区二区三 | 欧美日韩1区 | 久久精品国产免费一区二区三区 | 亚洲激情在线观看 | 精品日韩电影 | 亚洲精品一区中文字幕乱码 | 国产一级片久久久 | 一级二级三级黄色 | 中文字幕一区在线观看视频 | 久久综合九色综合欧美狠狠 | 中文字幕一区二区三区四区五区 | 日本国产精品视频 | 国产精品亚洲第一区在线暖暖韩国 | 狠狠av| 黄a在线观看| 久久久www成人免费精品张筱雨 | 亚洲狠狠| 成年网站在线观看 |