静态链接交叉编译的 QAxcontainer
Static linking cross compiled QAxcontainer
我正在尝试使用 gnu make 工具链交叉编译应用程序。之前我已经成功编译了Qt和QAxContainer模块。我似乎正在设置所有必需的环境变量。
通过以下命令使用 libtool I link 我的应用程序:
/bin/bash ../libtool --tag=CXX --tag CXX --mode=link /home/test/Gridcoin-Research/depends/x86_64-w64-mingw32/share/../native/bin/ccache x86_64-w64-mingw32-g++ -std=c++11 -Wstack-protector -fstack-protector-all -pipe -O2 -pthread -Wl,--dynamicbase -Wl,--nxcompat -Wl,--high-entropy-va -mwindows -all-static -L/home/test/Gridcoin-Research/depends/x86_64-w64-mingw32/share/../lib -o qt/gridcoinresearch.exe qt/qt_gridcoinresearch-bitcoin.o qt/res/bitcoin-qt.o qt/libgridcoinqt.a leveldb/libleveldb.a leveldb/libmemenv.a -L/home/test/Gridcoin-Research/depends/x86_64-w64-mingw32/share/../lib -lboost_system-mt-s -lboost_filesystem-mt-s -lboost_program_options-mt-s -lboost_thread_win32-mt-s -lboost_chrono-mt-s -lqwindows -lqminimal -lQt5Concurrent -lQt5Widgets -lQt5Network -lQt5Gui -lQt5Core -lqtharfbuzzng -lqtpcre -lqtpng -lz -lQt5AxServer -lQt5AxContainer -limm32 -L/home/test/Gridcoin-Research/depends/x86_64-w64-mingw32/share/../lib -L/home/test/Gridcoin-Research/depends/x86_64-w64-mingw32/share/../plugins/platforms -lQt5DBus -L/home/test/Gridcoin-Research/depends/x86_64-w64-mingw32/share/../lib -lqrencode -ldb_cxx-4.8 -lssl -lcrypto -lminiupnpc -lcurl -lQt5PlatformSupport -lssp -lcrypt32 -liphlpapi -lshlwapi -lmswsock -lws2_32 -ladvapi32 -lrpcrt4 -luuid -loleaut32 -lole32 -lcomctl32 -lshell32 -lwinmm -lwinspool -lcomdlg32 -lgdi32 -luser32 -lkernel32 -lmingwthrd
应用程序已成功编译为 linux 构建,其中不需要 AxContainer 模块。两个相关的 linking 错误是:
undefined reference to `QMetaStringTable::enter(QByteArray const&)'
undefined reference to `QVariantToVoidStar(QVariant const&, void*, QByteArray const &, unsigned int)'
甚至可以正确交叉编译 QAxContainer 吗?
编辑:构建不是使用标准 .pro 文件完成的,而是使用 gnu automake 工具链完成的。仅当交叉编译为 windows 时才包含 qaxcontainer。我静态编译 ActiveQt,然后 link 在构建过程中编译它。在此过程中,configure 检查 QAxContainer 是否存在,并能够找到主入口点。
问题是缺少 Qt5AxBase 库并且 linking 以错误的顺序完成。为了 link QAxContainer 在自我管理的环境中正确运行,需要按顺序包含以下 link 标志:
-lQt5AxContainer -lQt5AxBase
我正在尝试使用 gnu make 工具链交叉编译应用程序。之前我已经成功编译了Qt和QAxContainer模块。我似乎正在设置所有必需的环境变量。 通过以下命令使用 libtool I link 我的应用程序:
/bin/bash ../libtool --tag=CXX --tag CXX --mode=link /home/test/Gridcoin-Research/depends/x86_64-w64-mingw32/share/../native/bin/ccache x86_64-w64-mingw32-g++ -std=c++11 -Wstack-protector -fstack-protector-all -pipe -O2 -pthread -Wl,--dynamicbase -Wl,--nxcompat -Wl,--high-entropy-va -mwindows -all-static -L/home/test/Gridcoin-Research/depends/x86_64-w64-mingw32/share/../lib -o qt/gridcoinresearch.exe qt/qt_gridcoinresearch-bitcoin.o qt/res/bitcoin-qt.o qt/libgridcoinqt.a leveldb/libleveldb.a leveldb/libmemenv.a -L/home/test/Gridcoin-Research/depends/x86_64-w64-mingw32/share/../lib -lboost_system-mt-s -lboost_filesystem-mt-s -lboost_program_options-mt-s -lboost_thread_win32-mt-s -lboost_chrono-mt-s -lqwindows -lqminimal -lQt5Concurrent -lQt5Widgets -lQt5Network -lQt5Gui -lQt5Core -lqtharfbuzzng -lqtpcre -lqtpng -lz -lQt5AxServer -lQt5AxContainer -limm32 -L/home/test/Gridcoin-Research/depends/x86_64-w64-mingw32/share/../lib -L/home/test/Gridcoin-Research/depends/x86_64-w64-mingw32/share/../plugins/platforms -lQt5DBus -L/home/test/Gridcoin-Research/depends/x86_64-w64-mingw32/share/../lib -lqrencode -ldb_cxx-4.8 -lssl -lcrypto -lminiupnpc -lcurl -lQt5PlatformSupport -lssp -lcrypt32 -liphlpapi -lshlwapi -lmswsock -lws2_32 -ladvapi32 -lrpcrt4 -luuid -loleaut32 -lole32 -lcomctl32 -lshell32 -lwinmm -lwinspool -lcomdlg32 -lgdi32 -luser32 -lkernel32 -lmingwthrd
应用程序已成功编译为 linux 构建,其中不需要 AxContainer 模块。两个相关的 linking 错误是:
undefined reference to `QMetaStringTable::enter(QByteArray const&)'
undefined reference to `QVariantToVoidStar(QVariant const&, void*, QByteArray const &, unsigned int)'
甚至可以正确交叉编译 QAxContainer 吗?
编辑:构建不是使用标准 .pro 文件完成的,而是使用 gnu automake 工具链完成的。仅当交叉编译为 windows 时才包含 qaxcontainer。我静态编译 ActiveQt,然后 link 在构建过程中编译它。在此过程中,configure 检查 QAxContainer 是否存在,并能够找到主入口点。
问题是缺少 Qt5AxBase 库并且 linking 以错误的顺序完成。为了 link QAxContainer 在自我管理的环境中正确运行,需要按顺序包含以下 link 标志:
-lQt5AxContainer -lQt5AxBase