我正在尝试在 Linux 上使用MXE为 Windows编译electronpass-desktop 。我已经成功编译了它的所有依赖项(包括libelectronpass)。然后我执行(从):electronpass-desktop/build
/home/zigapk/Desktop/temp/mxe/usr/bin/i686-w64-mingw32.static-cmake -DCMAKE_PREFIX_PATH=/home/zigapk/Desktop/temp/mxe/usr/i686-w64-mingw32.static/i686-w64-mingw32.static-g++ ..
- cmake 找到库就好了make CROSS=i686-w64-mingw32.static- VERBOSE=1
- make 编译所有项目文件,但链接时出现问题:... [ 9%] 链接 CXX 可执行文件 ../../bin/electronpass.exe cd /home/zigapk/Desktop/temp/electronpass-desktop/build/app && /home/zigapk/Desktop/temp/mxe/ usr/x86_64-unknown-linux-gnu/bin/cmake -E cmake_link_script CMakeFiles/electronpass.dir/link.txt --verbose=1 /home/zigapk/Desktop/temp/mxe/usr/x86_64-unknown-linux-gnu /bin/cmake -E remove -f CMakeFiles/electronpass.dir/objects.a /home/zigapk/Desktop/temp/mxe/usr/bin/i686-w64-mingw32.static-ar cr CMakeFiles/electronpass.dir/objects .a @CMakeFiles/electronpass.dir/objects1.rsp /home/zigapk/Desktop/temp/mxe/usr/bin/i686-w64-mingw32。static-g++ -std=c++0x -fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon -virtual-dtor -Woverloaded-virtual -Werror=return-type -std=c++11 -Wall -Wextra -Wold-style-cast -pedantic -O3 -DNDEBUG -mwindows -Wl,--whole-archive CMakeFiles/electronpass .dir/objects.a -Wl,--no-whole-archive -o ../../bin/electronpass.exe -Wl,--out-imlib,../lib/libelectronpass.dll.a -Wl ,--major-image-version,0,--minor-image-version,0 @CMakeFiles/electronpass.dir/linklibs.rsp /home/zigapk/Desktop/temp/mxe/usr/i686-w64-mingw32.static /qt5/lib/libQt5Core.a(qregularexpression.o):qregularexpression.cpp:(.text+0x2b0): 未定义对“pcre2_match_16”的引用 ... /home/zigapk/Desktop/temp/mxe/usr/i686-w64 -mingw32.static/qt5/lib/libQt5Core.a(qregularexpression.o):qregularexpression.cpp:(.text+0x335): undefined reference to 'pcre2_jit_stack_create_16' ... /home/zigapk/Desktop/temp/mxe/usr/i686-w64-mingw32.static/qt5/lib/libQt5Core.a(qglobal .o):qglobal.cpp:(.text+0x22a): 未定义引用'_imp__WSACleanup@0' ... /home/zigapk/Desktop/temp/mxe/usr/i686-w64-mingw32.static/qt5/lib /libQt5Core.a(qeventdispatcher_win.o):qeventdispatcher_win.cpp:(.text+0x1bce): 未定义引用 '_imp__timeSetEvent@20' ... /home/zigapk/Desktop/temp/mxe/usr/i686-w64-mingw32 .static/qt5/lib/libQt5Core.a(qcoreapplication_win.o):qcoreapplication_win.cpp:(.text+0x336):未定义对“GetFileVersionInfoSizeW@8”的引用 ... /home/zigapk/Desktop/temp/mxe/usr /i686-w64-mingw32.static/qt5/lib/libQt5Network.a(qsslsocket_openssl_symbols.o):qsslsocket_openssl_symbols.cpp:(.text+0x6a1):未定义对“SSL_load_error_strings”的引用 ... ... /home/zigapk/Desktop/temp/mxe/usr/i686-w64-mingw32.static/qt5/lib/libQt5Network.a(qnativesocketengine_win.o):qnativesocketengine_win .cpp:(.text+0x181d): 未定义引用'_imp__WSAGetLastError@0' ... ... ... /home/zigapk/Desktop/temp/mxe/usr/i686-w64-mingw32.static/qt5/ lib/libQt5Gui.a(qzip.o):qzip.cpp:(.text+0x27c3): 未定义对“deflateEnd”的引用 /home/zigapk/Desktop/temp/mxe/usr/i686-w64-mingw32.static/qt5 /lib/libQt5Gui.a(qzip.o):qzip.cpp:(.text+0x2870): undefined reference to 'deflateEnd' collect2: error: ld returned 1 exit status make未定义对 '_imp__WSAGetLastError@0' 的引用 ... ... ... /home/zigapk/Desktop/temp/mxe/usr/i686-w64-mingw32.static/qt5/lib/libQt5Gui.a(qzip.o) :qzip.cpp:(.text+0x27c3): 未定义对“deflateEnd”的引用 /home/zigapk/Desktop/temp/mxe/usr/i686-w64-mingw32.static/qt5/lib/libQt5Gui.a(qzip.o ):qzip.cpp:(.text+0x2870): undefined reference to 'deflateEnd' collect2: error: ld returned 1 exit status make未定义对 '_imp__WSAGetLastError@0' 的引用 ... ... ... /home/zigapk/Desktop/temp/mxe/usr/i686-w64-mingw32.static/qt5/lib/libQt5Gui.a(qzip.o) :qzip.cpp:(.text+0x27c3): 未定义对“deflateEnd”的引用 /home/zigapk/Desktop/temp/mxe/usr/i686-w64-mingw32.static/qt5/lib/libQt5Gui.a(qzip.o ):qzip.cpp:(.text+0x2870): undefined reference to 'deflateEnd' collect2: error: ld returned 1 exit status make2:* [app/CMakeFiles/electronpass.dir/build.make:623: ../bin/electronpass.exe] 错误 1 make 2:离开目录 '/home/zigapk/Desktop/temp/electronpass-desktop/build' make 1 : * [CMakeFiles/Makefile2:119: app/CMakeFiles/electronpass.dir/all] 错误 2 make 1 : 离开目录 '/home/zigapk/Desktop/temp/electronpass-desktop/build' make: *** [ Makefile:139:全部]错误2
链接到整个输出:https ://pastebin.com/v3TiQGk2
如果有人能提供任何有用的信息,我将不胜感激,因为在过去的两周里,我一直在用头撞墙。
先感谢您