我试图与Mingw-w64交叉编译Qt5 's 32-bit compiler. The host platform is Ubuntu 12.10 64-bit and the target platform is 32-bit Windows. I' ve设法交叉编译OpenSSL库并将交叉编译的二进制文件/ libraries / includes安装到 ~/i686-w64-mingw32
.
当我尝试配置Qt时,问题浮出水面 . 我使用以下命令:
PKG_CONFIG_PATH=~/i686-w64-mingw32/lib/pkgconfig ./configure -prefix \
~/i686-w64-mingw32 -opensource -confirm-license -release -nomake demos \
-nomake examples -xplatform win32-g++ -device-option \
CROSS_COMPILE=i686-w64-mingw32-
qmake
二进制文件成功编译主机平台,并显示所有已启用功能的列表:
...
ODBC support ........... plugin
SQLite support ......... plugin (qt)
OpenSSL support ........ no
_2955755找不到OpenSSL包含的内容 . 在配置过程中打开 -v
标志确认了这一点 - 我收到一些关于无法找到 openssl/opensslv.h
的错误 .
所以我的下一步是确认 pkg-config
确实在工作:
PKG_CONFIG_PATH=~/i686-w64-mingw32/lib/pkgconfig pkg-config --libs openssl
它似乎是:
-L/home/nathan/i686-w64-mingw32/lib -lssl -lcrypto
那么我怎样才能说服Qt我有OpenSSL库?我已经尝试了 -force-pkg-config
标志,但它没有任何区别 .
1 回答
在Freenode的
#qt
Channels 询问后,我终于找到了一个有效的解决方案 .我没有尝试让
./configure
脚本使用pkg-config
,而是需要将编译器选项直接传递给./configure
. 所以命令看起来像这样:然后,编译器能够找到标头并启用运行时OpenSSL支持 .