前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Qt5.7.1添加支持openssl

Qt5.7.1添加支持openssl

作者头像
Linux兵工厂
发布2023-02-28 12:54:45
1.3K0
发布2023-02-28 12:54:45
举报
文章被收录于专栏:Linux兵工厂

1、openssl编译

  • 版本:openssl-1.0.2g 一定要选对Qt版本对应的openssl版本,由于开始选的openssl版本不对,导致编译Qt时出现很多错误。
  • 交叉编译
代码语言:javascript
复制
./config no-asm shared --prefix=/opt/Xilinx2018_zynq/zynq_openssl_1.0.2/ --cross-compile-prefix=/opt/Xilinx/SDK/2018.3/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-

make -j4

make install

2、Qt5.7.1编译

代码语言:javascript
复制
1.
首先确保qt源码目录下交叉编译命令生效
cd qt-everywhere-opensource-src-5.7.1 
source /opt/Xilinx/SDK/2018.3/settings64.sh

2.执行configure,其配置如下:
./configure -xplatform arm-linux-gnueabihf-g++ \
    -openssl-linked \
    -I/opt/Xilinx2018_zynq/zynq_openssl_1.0.2/include \
    -L/opt/Xilinx2018_zynq/zynq_openssl_1.0.2/lib -lssl -lcrypto \
    -opensource \
    -confirm-license \
    -skip qtquickcontrols \
    -skip qtwebchannel \
    -skip qtactiveqt \
    -skip qtandroidextras \
    -skip qtdeclarative \
    -skip qtimageformats \
    -skip qtmacextras \
    `#-skip qtserialport` \
    -skip qtx11extras \
    -skip qtxmlpatterns \
    -skip qtconnectivity \
    -skip qtdoc \
    -skip qtgraphicaleffects \
    -skip qtlocation \
    -skip qtmultimedia \
    -skip qtsensors \
    -skip qttools \
    -skip qttranslations \
    -skip qtwayland \
    -skip qtwebchannel \
    -skip qtwebengine \
    `#-skip qtwebsockets` \
    -skip qtwinextras \
    -verbose \
    `#-no-gif` \
    `#-no-libjpeg` \
    -qt-libjpeg \
    -qt-libpng \
    -no-mtdev \
    -no-sql-db2 \
    -no-sql-ibase \
    -no-sql-mysql \
    -no-xcb \
    -qt-freetype \
    -fontconfig \
    -no-harfbuzz \
    -no-xinput2 \
    -no-xcb-xlib \
    -no-pulseaudio \
    -no-alsa \
    -no-cups \
    -no-iconv \
    -no-icu \
    -no-eglfs \
    -no-dbus \
    -prefix $ZYNQ_QT_INSTALL
3. make

3、更新库

将新生成的libQt5NetWork、libQt5WebSocket相关的库文件替换;然后再把openssl相关的库libssl、libcrypto放在目标板下

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2022-11-16,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 Linux兵工厂 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 1、openssl编译
    • 2、Qt5.7.1编译
      • 3、更新库
      相关产品与服务
      SSL 证书
      腾讯云 SSL 证书(SSL Certificates)为您提供 SSL 证书的申请、管理、部署等服务,为您提供一站式 HTTPS 解决方案。
      领券
      问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档