Не удается найти пакеты gtk3 для mingw64
Я пытался перекрестно скомпилировать приложение Gtk-rs для Windows, но компоновщик жалуется, что не может найти некоторые библиотеки gtk. Обратите внимание, что одно и то же приложение будет работать при компиляции для собственного Linux:
error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1
|
= note: "x86_64-w64-mingw32-gcc" "-fno-use-linker-plugin" "-Wl,--nxcompat" "-Wl,--dynamicbase" "-Wl,--disable-auto-image-base" "-m64" "-Wl,--high-entropy-va" "/home/bruce3434/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/rsbegin.o" "-L" "/home/bruce3434/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/gtkrscross-207d51d3ed9c4ee6.gtkrscross.d6u0ovm3-cgu.0.rcgu.o" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/gtkrscross-207d51d3ed9c4ee6.gtkrscross.d6u0ovm3-cgu.1.rcgu.o" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/gtkrscross-207d51d3ed9c4ee6.gtkrscross.d6u0ovm3-cgu.10.rcgu.o" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/gtkrscross-207d51d3ed9c4ee6.gtkrscross.d6u0ovm3-cgu.11.rcgu.o" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/gtkrscross-207d51d3ed9c4ee6.gtkrscross.d6u0ovm3-cgu.12.rcgu.o" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/gtkrscross-207d51d3ed9c4ee6.gtkrscross.d6u0ovm3-cgu.13.rcgu.o" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/gtkrscross-207d51d3ed9c4ee6.gtkrscross.d6u0ovm3-cgu.14.rcgu.o" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/gtkrscross-207d51d3ed9c4ee6.gtkrscross.d6u0ovm3-cgu.15.rcgu.o" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/gtkrscross-207d51d3ed9c4ee6.gtkrscross.d6u0ovm3-cgu.2.rcgu.o" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/gtkrscross-207d51d3ed9c4ee6.gtkrscross.d6u0ovm3-cgu.3.rcgu.o" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/gtkrscross-207d51d3ed9c4ee6.gtkrscross.d6u0ovm3-cgu.4.rcgu.o" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/gtkrscross-207d51d3ed9c4ee6.gtkrscross.d6u0ovm3-cgu.5.rcgu.o" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/gtkrscross-207d51d3ed9c4ee6.gtkrscross.d6u0ovm3-cgu.6.rcgu.o" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/gtkrscross-207d51d3ed9c4ee6.gtkrscross.d6u0ovm3-cgu.7.rcgu.o" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/gtkrscross-207d51d3ed9c4ee6.gtkrscross.d6u0ovm3-cgu.8.rcgu.o" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/gtkrscross-207d51d3ed9c4ee6.gtkrscross.d6u0ovm3-cgu.9.rcgu.o" "-o" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/gtkrscross-207d51d3ed9c4ee6.exe" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/gtkrscross-207d51d3ed9c4ee6.106ulhbr17826qq7.rcgu.o" "-Wl,--gc-sections" "-nodefaultlibs" "-L" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps" "-L" "/home/bruce3434/proj/gtkrscross/target/release/deps" "-L" "/home/bruce3434/.cargo/registry/src/github.com-1ecc6299db9ec823/winapi-x86_64-pc-windows-gnu-0.4.0/lib" "-L" "/home/bruce3434/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib" "-Wl,-Bstatic" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libgtk-8c74b22985e5df54.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libgdk-34de63afc0761694.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libpango-ad062bbe3fc0eb7b.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libgdk_pixbuf-0f2bb192ac593077.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libcairo-e9eb6644f42e9c76.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libatk-1e6e83434be2309d.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libgtk_sys-33d624969fd3014f.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libatk_sys-44518a8f4f7f1253.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libgdk_sys-afa127cebea12e02.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libpango_sys-1bd884bf1fd9e1fd.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libgdk_pixbuf_sys-9051b987b7098ca5.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libcairo_sys-0d27adb6a3ddf64f.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libgio-7b216910331b005d.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libfutures-292b12136035a1c8.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libthiserror-c6c400964b0ccb84.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libgio_sys-fa90800a415d5947.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libwinapi-5b6854e7dbabbbcb.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libglib-1c5f28c2b03e454d.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libfutures_executor-a56bab95ce77d2ce.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libfutures_util-2724fdd81a8cec4a.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libmemchr-077ed17647b4f98b.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libfutures_io-edd95c052eb21486.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libslab-ab51bb97c0ec0ead.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libpin_project_lite-2dfce2817e965dd0.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libpin_utils-c4388d28edfddb1b.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libfutures_task-94ed5c69b35c2244.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libfutures_channel-a18172a57678e234.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libfutures_sink-7eb1a4ea26cbe5ba.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libfutures_core-7fb7a794cb35930f.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libgobject_sys-8977b1bcd4d3b7ad.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libglib_sys-5769776be173e41e.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/liblibc-3f0206a18c8503f6.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libonce_cell-5a350051197ded27.rlib" "/home/bruce3434/proj/gtkrscross/target/x86_64-pc-windows-gnu/release/deps/libbitflags-8cfdf0fe073e15b0.rlib" "-Wl,--start-group" "/home/bruce3434/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libstd-c1f4a34954f44b86.rlib" "/home/bruce3434/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libpanic_unwind-63d918f6a4328727.rlib" "/home/bruce3434/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libobject-df02665a14c23c3f.rlib" "/home/bruce3434/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libaddr2line-8a2ca8def5625c96.rlib" "/home/bruce3434/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libgimli-f8602c621ed79cb5.rlib" "/home/bruce3434/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_demangle-8124381f500c8a69.rlib" "/home/bruce3434/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libhashbrown-2260daa86b23c242.rlib" "/home/bruce3434/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_std_workspace_alloc-5b3ec382765aebe0.rlib" "/home/bruce3434/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libunwind-58f1a51695d3489d.rlib" "/home/bruce3434/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libcfg_if-46b81e008718457e.rlib" "/home/bruce3434/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/liblibc-f4a48eaff8400529.rlib" "/home/bruce3434/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/liballoc-7094347f61afa1d3.rlib" "/home/bruce3434/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_std_workspace_core-be0238fd280e8b76.rlib" "/home/bruce3434/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libcore-bb3b979426878ebc.rlib" "-Wl,--end-group" "/home/bruce3434/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libcompiler_builtins-021a8bc03364b43c.rlib" "-Wl,-Bdynamic" "-lgtk-3" "-lgdk-3" "-lpangocairo-1.0" "-lpango-1.0" "-lharfbuzz" "-latk-1.0" "-lcairo-gobject" "-lcairo" "-lgdk_pixbuf-2.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" "-latk-1.0" "-lgobject-2.0" "-lglib-2.0" "-lgdk-3" "-lpangocairo-1.0" "-lpango-1.0" "-lharfbuzz" "-lgdk_pixbuf-2.0" "-lcairo-gobject" "-lcairo" "-lgobject-2.0" "-lglib-2.0" "-lpango-1.0" "-lgobject-2.0" "-lglib-2.0" "-lharfbuzz" "-lgdk_pixbuf-2.0" "-lgobject-2.0" "-lglib-2.0" "-lcairo-gobject" "-lcairo" "-lgobject-2.0" "-lglib-2.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" "-lwinapi_advapi32" "-lwinapi_cfgmgr32" "-lwinapi_kernel32" "-lwinapi_user32" "-lwinapi_ws2_32" "-lgobject-2.0" "-lglib-2.0" "-lglib-2.0" "-ladvapi32" "-lws2_32" "-luserenv" "-lgcc_eh" "-l:libpthread.a" "-lmsvcrt" "-lmingwex" "-lmingw32" "-lgcc" "-lmsvcrt" "-luser32" "-lkernel32" "/home/bruce3434/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/rsend.o"
= note: /usr/bin/x86_64-w64-mingw32-ld: cannot find -lgtk-3
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lgdk-3
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lpangocairo-1.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lpango-1.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lharfbuzz
/usr/bin/x86_64-w64-mingw32-ld: cannot find -latk-1.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lcairo-gobject
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lcairo
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lgdk_pixbuf-2.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lgio-2.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lgobject-2.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lglib-2.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -latk-1.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lgobject-2.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lglib-2.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lgdk-3
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lpangocairo-1.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lpango-1.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lharfbuzz
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lgdk_pixbuf-2.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lcairo-gobject
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lcairo
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lgobject-2.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lglib-2.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lpango-1.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lgobject-2.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lglib-2.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lharfbuzz
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lgdk_pixbuf-2.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lgobject-2.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lglib-2.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lcairo-gobject
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lcairo
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lgobject-2.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lglib-2.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lgio-2.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lgobject-2.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lglib-2.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lgobject-2.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lglib-2.0
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lglib-2.0
я установил
1 ответ
Попробуйте переместить целевые файлы Windows (включая (файлы заголовков), папки usr, lib, содержащие файлы .a или .dll.a) в вашу систему Linux.
С тех пор, как я узнал, что
.pc
файлы из msys2 содержат префикс переменной пути к
/mingw64
каталог.
РЕДАКТИРОВАТЬ: тем временем я пытаюсь заставить статические библиотеки работать с Msys2: https://github.com/msys2/MINGW-packages/pull/9558