gtk-rs / gtk4-rs

Rust bindings of GTK 4
https://gtk-rs.org/gtk4-rs/
MIT License
1.9k stars 174 forks source link

Compile application with gtk4-rs on MSYS2 Windows #232

Closed mmMike closed 3 years ago

mmMike commented 3 years ago

Hi,

I'm trying to compile the minimal example (basic.rs) on Windows. I have a clean MSYS2 setup and Rust also via MSYS2. The packages for Freetype, Gtk3 and Gtk4 are installed.

The Gtk3 version of basic.rs works as expected.

The Gtk4 version gives the following problems, all but one releated to printing:

...
   Compiling gtk4 v0.1.0 (C:\Projekte\gtk4)
error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1
  |
  = note: "x86_64-w64-mingw32-gcc" "-fno-use-linker-plugin" "-Wl,--nxcompat" "-m64" "-nostartfiles" "C:\\msys64\\mingw64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\self-contained\\crt2.o" "C:\\msys64\\mingw64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsbegin.o" "-L" "C:\\msys64\\mingw64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-L" "C:\\msys64\\mingw64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\self-contained" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.169cf7x5pmb6toqe.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.19gqkss5th038d97.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.1aibk9kjzhmbj758.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.1b9xluzkiv7ppnhp.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.1kt5hetnk7b5frjv.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.1n1el9ow0pd3ltbl.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.1yej21y13nq38d5d.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.2pezhyajc9ok7rk2.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.2pz5d8e27ocfwobg.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.3airlsk2t9wzkymw.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.3crirfszdfdzw5b8.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.3h0hwnqjgnc6uwne.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.3qj4t4jvoibw6w8n.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.3qym2ba49y6r5v4y.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.3tqr3y41lyoyjcqh.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.3wvpouoxbwe86hjg.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.3yh77rjw6wcq67w2.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.3z0d3qr9u8y5vzbj.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.4aj3wmui965vjtwq.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.4fhoj7sojaxw8fn7.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.4hbzkj9gintwwhxf.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.4iuywmdjxltiehl2.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.4ojy1frpzalo85vw.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.4qqy4esk47c5azf4.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.4z99v1y3kn9pehoh.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.545bd8m8av8fu21m.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.59g2ufiqxconvo81.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.egqp0amuq2sl3sy.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.gljvvucpll0t2eo.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.h7eq7z54k3dl8mf.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.jalx0y4lk7b8bxp.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.s1kd4s2r61zfziw.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.skrgcqqnkq7kawu.rcgu.o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.tfdbqxczlgv4u0y.rcgu.o" "-o" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.exe" "C:\\Projekte\\gtk4\\target\\debug\\deps\\gtk4-f191d6a267aaf896.5gixhb1lghc2vh8a.rcgu.o" "-Wl,--gc-sections" "-nodefaultlibs" "-L" "C:\\Projekte\\gtk4\\target\\debug\\deps" "-L" "C:/msys64/mingw64/lib" "-L" "C:/msys64/mingw64/lib" "-L" "C:/msys64/mingw64/lib" "-L" "C:/msys64/mingw64/lib" "-L" "C:/msys64/mingw64/lib" "-L" "C:/msys64/mingw64/lib" "-L" "C:/msys64/mingw64/lib" "-L" "C:/msys64/mingw64/lib" "-L" "C:\\Users\\Michael\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\winapi-x86_64-pc-windows-gnu-0.4.0\\lib" "-L" "C:/msys64/mingw64/lib" "-L" "C:/msys64/mingw64/lib" "-L" "C:/msys64/mingw64/lib" "-L" "C:/msys64/mingw64/lib" "-L" "C:/msys64/mingw64/lib" "-L" "C:\\msys64\\mingw64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-Wl,-Bstatic" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libgtk4-8419b7cb3b680bc5.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libgsk4-c073eff34c4624c7.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libgraphene-4fd0a2a075c2a964.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libgdk4-e98cbc6fdff24248.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libpango-e807c100207f2200.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libgdk_pixbuf-658a8a0ad83559c7.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libgio-1cb7f96b83b8bcac.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libfutures_io-860e02e6a1ae735b.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libcairo-7db71ce5aae178c7.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libthiserror-7dc57688ef220d73.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libglib-ebf6eedeacd8215c.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libfutures_executor-5acbdcd02daa80e4.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libfutures_util-86732664a692b3d7.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libslab-23b897fa1ebaa9b7.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libpin_project_lite-1523d5d9d6e210fa.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libpin_utils-ef42b8aecbb99c4f.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libfutures_channel-0a30ade33f212c78.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libfutures_task-25ce11427343a322.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libfutures_core-e3a5189e96897510.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libsmallvec-82f3a9bd6b4e9ad4.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libonce_cell-df354ca58f70963b.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libbitflags-a060f65939ef8a0c.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libfreetype-9e909832a437227d.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libfreetype_sys-bb30cf686c2cd935.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libgtk4_sys-ff2ed7ff0314168f.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libgsk4_sys-1ee3308ab21cb362.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libgraphene_sys-8496c58631db896b.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libgdk4_sys-902f700812b6a87d.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libpango_sys-87290894d1794cba.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libgdk_pixbuf_sys-b33bfeb57a170ce3.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libgio_sys-3785bfa632f8e2ac.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libwinapi-80ee8717f39a95ce.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libgobject_sys-46b30093739c22ba.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libcairo_sys-55a1ffacbf62cd62.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libglib_sys-7ececc7f70611804.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\liblibc-0d6085d70b69d55d.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libfield_offset-15854a9489db7a51.rlib" "C:\\Projekte\\gtk4\\target\\debug\\deps\\libmemoffset-938d6aa046eb388e.rlib" "-Wl,--start-group" "C:\\msys64\\mingw64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libstd-86ac2e841347e4a7.rlib" "C:\\msys64\\mingw64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libpanic_unwind-120013aaac9b93e8.rlib" "C:\\msys64\\mingw64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libobject-d6b62bcd71835768.rlib" "C:\\msys64\\mingw64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libaddr2line-3638ec75e3236252.rlib" "C:\\msys64\\mingw64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libgimli-43873a1512bc2efb.rlib" "C:\\msys64\\mingw64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\librustc_demangle-d4922b6cdb11dee1.rlib" "C:\\msys64\\mingw64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libhashbrown-b731889dd5462a11.rlib" "C:\\msys64\\mingw64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\librustc_std_workspace_alloc-20139b8c273d953c.rlib" "C:\\msys64\\mingw64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libunwind-d66a87a18fd8284e.rlib" "C:\\msys64\\mingw64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcfg_if-eb979175ad863779.rlib" "C:\\msys64\\mingw64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\liblibc-7bb59b55a51bdcc0.rlib" "C:\\msys64\\mingw64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\liballoc-905ea7e13741408f.rlib" "C:\\msys64\\mingw64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\librustc_std_workspace_core-456ea52c912ff5b8.rlib" "C:\\msys64\\mingw64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcore-95554cc5bf8c6023.rlib" "-Wl,--end-group" "C:\\msys64\\mingw64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcompiler_builtins-249d8c55fdd72e0b.rlib" "-Wl,-Bdynamic" "-lgobject-2.0" "-lfreetype" "-lgtk-4" "-lpangowin32-1.0" "-lpangocairo-1.0" "-lpango-1.0" "-lharfbuzz" "-lgdk_pixbuf-2.0" "-lcairo-gobject" "-lcairo" "-lvulkan" "-lgraphene-1.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" "-lintl" "-lgtk-4" "-lpangowin32-1.0" "-lpangocairo-1.0" "-lpango-1.0" "-lharfbuzz" "-lgdk_pixbuf-2.0" "-lcairo-gobject" "-lcairo" "-lvulkan" "-lgraphene-1.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" "-lintl" "-lgraphene-1.0" "-lgobject-2.0" "-lglib-2.0" "-lintl" "-lgtk-4" "-lpangowin32-1.0" "-lpangocairo-1.0" "-lpango-1.0" "-lharfbuzz" "-lgdk_pixbuf-2.0" "-lcairo-gobject" "-lcairo" "-lvulkan" "-lgraphene-1.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" "-lintl" "-lpango-1.0" "-lgobject-2.0" "-lglib-2.0" "-lintl" "-lharfbuzz" "-lgdk_pixbuf-2.0" "-lgobject-2.0" "-lglib-2.0" "-lintl" "-lgio-2.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" "-lintl" "-lwinapi_advapi32" "-lwinapi_cfgmgr32" "-lwinapi_kernel32" "-lwinapi_user32" "-lwinapi_ws2_32" "-lgobject-2.0" "-lglib-2.0" "-lintl" "-lcairo-gobject" "-lcairo" "-lgobject-2.0" "-lglib-2.0" "-lintl" "-lgobject-2.0" "-lglib-2.0" "-lintl" "-ladvapi32" "-lws2_32" "-luserenv" "-lgcc_eh" "-l:libpthread.a" "-lmsvcrt" "-lmingwex" "-lmingw32" "-lgcc" "-lmsvcrt" "-luser32" "-lkernel32" "C:\\msys64\\mingw64\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsend.o"
  = note: C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::new':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:44: undefined reference to `gtk_print_job_new'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::get_collate':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:55: undefined reference to `gtk_print_job_get_collate'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::get_n_up':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:60: undefined reference to `gtk_print_job_get_n_up'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::get_n_up_layout':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:65: undefined reference to `gtk_print_job_get_n_up_layout'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::get_num_copies':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:70: undefined reference to `gtk_print_job_get_num_copies'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::get_page_ranges':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:78: undefined reference to `gtk_print_job_get_page_ranges'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::get_page_set':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:87: undefined reference to `gtk_print_job_get_page_set'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::get_pages':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:92: undefined reference to `gtk_print_job_get_pages'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::get_printer':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:97: undefined reference to `gtk_print_job_get_printer'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::get_reverse':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:102: undefined reference to `gtk_print_job_get_reverse'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::get_rotate':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:107: undefined reference to `gtk_print_job_get_rotate'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::get_scale':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:112: undefined reference to `gtk_print_job_get_scale'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::get_settings':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:117: undefined reference to `gtk_print_job_get_settings'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::get_status':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:122: undefined reference to `gtk_print_job_get_status'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::get_surface':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:129: undefined reference to `gtk_print_job_get_surface'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::get_title':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:140: undefined reference to `gtk_print_job_get_title'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::get_track_print_status':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:146: undefined reference to `gtk_print_job_get_track_print_status'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::set_collate':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:155: undefined reference to `gtk_print_job_set_collate'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::set_n_up':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:162: undefined reference to `gtk_print_job_set_n_up'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::set_n_up_layout':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:169: undefined reference to `gtk_print_job_set_n_up_layout'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::set_num_copies':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:176: undefined reference to `gtk_print_job_set_num_copies'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::set_page_set':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:183: undefined reference to `gtk_print_job_set_page_set'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::set_pages':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:190: undefined reference to `gtk_print_job_set_pages'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::set_reverse':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:197: undefined reference to `gtk_print_job_set_reverse'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::set_rotate':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:204: undefined reference to `gtk_print_job_set_rotate'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::set_scale':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:211: undefined reference to `gtk_print_job_set_scale'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::set_source_fd':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:219: undefined reference to `gtk_print_job_set_source_fd'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::print_job::PrintJob::set_track_print_status':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:251: undefined reference to `gtk_print_job_set_track_print_status'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::printer::Printer::accepts_pdf':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/printer.rs:36: undefined reference to `gtk_printer_accepts_pdf'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::printer::Printer::accepts_ps':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/printer.rs:41: undefined reference to `gtk_printer_accepts_ps'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::printer::Printer::compare':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/printer.rs:46: undefined reference to `gtk_printer_compare'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::printer::Printer::get_capabilities':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/printer.rs:56: undefined reference to `gtk_printer_get_capabilities'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::printer::Printer::get_default_page_size':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/printer.rs:62: undefined reference to `gtk_printer_get_default_page_size'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::printer::Printer::get_description':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/printer.rs:70: undefined reference to `gtk_printer_get_description'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::printer::Printer::get_hard_margins':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/printer.rs:80: undefined reference to `gtk_printer_get_hard_margins'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::printer::Printer::get_hard_margins_for_paper_size':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/printer.rs:109: undefined reference to `gtk_printer_get_hard_margins_for_paper_size'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::printer::Printer::get_icon_name':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/printer.rs:131: undefined reference to `gtk_printer_get_icon_name'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::printer::Printer::get_job_count':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/printer.rs:136: undefined reference to `gtk_printer_get_job_count'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::printer::Printer::get_location':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/printer.rs:141: undefined reference to `gtk_printer_get_location'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::printer::Printer::get_name':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/printer.rs:146: undefined reference to `gtk_printer_get_name'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::printer::Printer::get_state_message':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/printer.rs:151: undefined reference to `gtk_printer_get_state_message'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::printer::Printer::has_details':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/printer.rs:156: undefined reference to `gtk_printer_has_details'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::printer::Printer::is_accepting_jobs':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/printer.rs:161: undefined reference to `gtk_printer_is_accepting_jobs'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::printer::Printer::is_active':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/printer.rs:166: undefined reference to `gtk_printer_is_active'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::printer::Printer::is_default':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/printer.rs:171: undefined reference to `gtk_printer_is_default'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::printer::Printer::is_paused':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/printer.rs:176: undefined reference to `gtk_printer_is_paused'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::printer::Printer::is_virtual':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/printer.rs:181: undefined reference to `gtk_printer_is_virtual'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::printer::Printer::list_papers':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/printer.rs:187: undefined reference to `gtk_printer_list_papers'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::auto::printer::Printer::request_details':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/printer.rs:196: undefined reference to `gtk_printer_request_details'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `gtk4::print_job::<impl gtk4::auto::print_job::PrintJob>::set_page_ranges':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src/print_job.rs:44: undefined reference to `gtk_print_job_set_page_ranges'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `<gtk4::auto::print_job::PrintJob as glib::types::StaticType>::static_type':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/print_job.rs:30: undefined reference to `gtk_print_job_get_type'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.11.rcgu.o): in function `<gtk4::auto::printer::Printer as glib::types::StaticType>::static_type':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/printer.rs:24: undefined reference to `gtk_printer_get_type'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgtk4-8419b7cb3b680bc5.rlib(gtk4-8419b7cb3b680bc5.gtk4.b8kbsw9o-cgu.15.rcgu.o): in function `<gtk4::auto::flags::PrintCapabilities as glib::types::StaticType>::static_type':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gtk4\src\auto/flags.rs:690: undefined reference to `gtk_print_capabilities_get_type'
          C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Projekte\gtk4\target\debug\deps\libgsk4-c073eff34c4624c7.rlib(gsk4-c073eff34c4624c7.gsk4.bxzsf6jb-cgu.5.rcgu.o): in function `gsk4::text_node::TextNode::has_color_glyphs':
          C:\Users\Michael\.cargo\git\checkouts\gtk4-rs-e74ad56283dfeb5e\13a8317\gsk4\src/text_node.rs:68: undefined reference to `gsk_text_node_has_color_glyphs'
          collect2.exe: error: ld returned 1 exit status

Testing with rust via rustup and MSVC toolchain gives linker errors with missing gobject-2.0.lib (and other *gtk*.lib). The .lib are not in the MSYS2 packages, only .dll and *.dll.a. Rust projects without Gtk work with this toolchain.

Is it already possible to compile a gtk4-rs application on Windows?

bilelmoussaoui commented 3 years ago

Which version of gtk4 are you using?

Is it already possible to compile a gtk4-rs application on Windows?

No idea, patches to make it work are very appreciated

sdroege commented 3 years ago

Compiling a GTK4 Rust application on Windows should work fine in theory but there are probably bugs if nobody tried it yet. And I think this is such a bug that you recently introduced @bilelmoussaoui :)

gtk_printer_is_paused and related are from gtk-4.0/unix-print/gtk/gtkprinter.h and only available on UNIX, not on Windows.

I don't know what the problem with gsk_text_node_has_color_glyphs though.

mmMike commented 3 years ago

I used the regular package from https://packages.msys2.org/package/mingw-w64-x86_64-gtk4, so version 4.1.2. After your question I tried again with an older package and version 4.0.3 with the same errors.

To be honest, I wouldn't even know where to start with this problem.

bilelmoussaoui commented 3 years ago

Compiling a GTK4 Rust application on Windows should work fine in theory but there are probably bugs if nobody tried it yet. And I think this is such a bug that you recently introduced @bilelmoussaoui :)

Would be nice to get a Windows CI for gtk4-rs as well in the future, to avoid such issues :-)

@mmMike Do you mind trying to disable gtk::Printer, gtk::PrintJob & gtk::PrintCapabilities on any platforms other than linux? See https://github.com/gtk-rs/gtk4-rs/blob/master/gtk4/Gir.toml#L1363 on how to do so. After that, you have to run python3 generator.py to re-generate the bindings.

bilelmoussaoui commented 3 years ago

Mind trying to build from #233 ? :)

mmMike commented 3 years ago

Hi, you were faster, but I wouldn't have known how to fix the code parts anyway. However from https://github.com/gtk-rs/gtk4-rs/compare/bilelmoussaoui/printer-win-fix I needed the following diff:

diff --git a/gsk4/src/text_node.rs b/gsk4/src/text_node.rs
index e15835f59..21118f9c3 100644
--- a/gsk4/src/text_node.rs
+++ b/gsk4/src/text_node.rs
@@ -63,6 +63,8 @@ impl TextNode {
         unsafe { from_glib_none(ffi::gsk_text_node_get_offset(self.to_glib_none().0)) }
     }

+    #[cfg(any(target_os = "linux", feature = "dox"))]
+    #[cfg_attr(feature = "dox", doc(cfg(target_os = "linux")))]
     #[doc(alias = "gsk_text_node_has_color_glyphs")]
     pub fn has_color_glyphs(&self) -> bool {
         unsafe { from_glib(ffi::gsk_text_node_has_color_glyphs(self.to_glib_none().0)) }
diff --git a/gtk4/src/auto/functions.rs b/gtk4/src/auto/functions.rs
index 5679234e1..b894cd9f3 100644
--- a/gtk4/src/auto/functions.rs
+++ b/gtk4/src/auto/functions.rs
@@ -10,7 +10,6 @@ use crate::AccessibleState;
 use crate::DebugFlags;
 use crate::PageSetup;
 use crate::PrintSettings;
-use crate::Printer;
 use crate::StyleContext;
 use crate::TextDirection;
 use crate::TreeModel;
@@ -155,6 +154,8 @@ pub fn disable_setlocale() {
 //}

 #[doc(alias = "gtk_enumerate_printers")]
+#[cfg(any(target_os = "linux", feature = "dox"))]
+#[cfg_attr(feature = "dox", doc(cfg(target_os = "linux")))]
 pub fn enumerate_printers<P: Fn(&Printer) -> bool + Send + Sync + 'static>(func: P, wait: bool) {
     assert_initialized_main_thread!();
     let func_data: Box_<P> = Box_::new(func);

With that it compiles and runs, just the theme is off, no hidpi scaling and I'm on a 2x display.

bilelmoussaoui commented 3 years ago

I have handled the missing function in the PR as well. No idea why gsk_text_node_has_color_glyphs is causing issues on windows though.

mmMike commented 3 years ago

I checked again, the Gtk3 example respects the scaling to 2x, Gtk4 programs don't on my system, also a C example doesn't respect the scaling.

But at least one step further today. Thank you.

bilelmoussaoui commented 3 years ago

This seems to be the reason why https://github.com/GNOME/gtk/commit/5a8e2a8c2d5a5f41a1135e1890c597ff75b560f1

@sdroege any idea how we should handle it here?

sdroege commented 3 years ago

@sdroege any idea how we should handle it here?

That effectively only makes it available in the first release that contains this fix, so that's what you'll have to use as version constraint then.

bilelmoussaoui commented 3 years ago

I checked again, the Gtk3 example respects the scaling to 2x, Gtk4 programs don't on my system, also a C example doesn't respect the scaling.

But at least one step further today. Thank you.

You should be able to build gtk4-rs just fine now. Please report any issues you see in the upstream gtk repository so they get fixed.