-
-
Notifications
You must be signed in to change notification settings - Fork 804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Windows/mingw64) Can't link static binary #1769
Comments
uh, wow that's a lot of flags. Usually I'd just do |
Condensed it down to the following:
The SDL build now runs outside of mingw, but I still get the EDIT: I just tried again from a fresh mingw64 setup and still got the same exact errors at link time:
|
You could install a version of Docker that uses virtualbox instead, and
get pretty much the same results.
https://docs.docker.com/toolbox/toolbox_install_windows/ There might be
a few bugs when using even the latest version of Docker Toolbox, so try
going a version or two older, but will be useful since you can't install
Hyper-V in Windows 10 Home. Some of the issue pages on their github page
explain which version will work if you have issues.
…On 5/30/2020 7:02 PM, autofire372 wrote:
Condensed it down to the following:
|cmake -DCMAKE_EXE_LINKER_FLAGS=-static
-DCMAKE_PREFIX_PATH=/mingw64/qt5-static -DUSE_MINIZIP=OFF
-DBUILD_STATIC=ON -DBUILD_SHARED=OFF .. -G "MSYS Makefiles"|
I still get the |cannot fine -lqwindows| error atthe qt build's link time.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1769 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGLLYJHNALS4KDX7LBQZDLRUGNBFANCNFSM4NO4U5LQ>.
|
You actually can install Hyper-V (and Docker Desktop) on Windows 10 Home, but Docker still won't let you run Windows container images unless you upgrade to Pro. |
Can you see if changing |
Unfortunately, that just resulted in a bunch of undefined references to things like |
I managed to reproduce this, after a lot of fighting with my Windows VM. I'll have a fix tonight. Unfortuantely several of the libraries that it depends on still aren't static so you'll need to package a few DLLs (e.g. SDL) but it's way fewer than before. |
I am at my wit's end. I am trying to build mGBA as a static binary on Windows via mingw64. I have installed qt5-static, and installed ffmpeg 4.2.3 from source. I then invoke the following cmake command:
cmake -DCMAKE_EXE_LINKER_FLAGS=-static -DUSE_MINIZIP=OFF -DZLIB_LIBRARY_RELEASE=/mingw64/lib/libz.a -DEPOXY_LIBRARIES=/mingw64/lib/libepoxy.a -DPNG_LIBRARY_RELEASE=/mingw64/lib/libpng.a -DSQLite3_LIBRARY=/mingw64/lib/libsqlite3.a -DQt5Core_DIR=/mingw/qt5-static/lib/cmake/Qt5Core -DQt5Gui_DIR:PATH=/mingw64/qt5-static/lib/cmake/Qt5Gui -DQt5LinguistTools_DIR:PATH=/mingw64/qt5-static/lib/cmake/Qt5LinguistTools -DQt5Multimedia_DIR:PATH=/mingw64/qt5-static/lib/cmake/Qt5Multimedia -DQt5Network_DIR:PATH=/mingw64/qt5-static/lib/cmake/Qt5Network -DQt5OpenGL_DIR:PATH=/mingw64/qt5-static/lib/cmake/Qt5OpenGL -DQt5Widgets_DIR:PATH=/mingw64/qt5-static/lib/cmake/Qt5Widgets -DQt5_DIR:PATH=/mingw64/qt5-static/lib/cmake/Qt5 -DQTPCRE:FILEPATH=/mingw64/qt5-static/lib/libqtpcre2.a -DBUILD_STATIC=ON -DBUILD_SHARED=OFF .. -G "MSYS Makefiles"
The SDL binary builds fine (though it refuses to run outside minGW), but the Qt binary trips at the finish line:
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lqwindows C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lqwindows collect2.exe: error: ld returned 1 exit status make[2]: *** [qt/CMakeFiles/mgba-qt.dir/build.make:1755: qt/mGBA.exe] Error 1 make[1]: *** [CMakeFiles/Makefile2:513: qt/CMakeFiles/mgba-qt.dir/all] Error 2 make: *** [Makefile:172: all] Error 2
I can't use Docker as I am on Windows 10 Home. What am I doing wrong?
The text was updated successfully, but these errors were encountered: