Skip to content
This repository was archived by the owner on Mar 4, 2024. It is now read-only.
This repository was archived by the owner on Mar 4, 2024. It is now read-only.

Cross compiling of gtk-rs project from linux to windows failing #437

Open
@fightthepower

Description

@fightthepower

I have read preparing rust tutorial and I have followed all the steps , including a additional step recommended by this stack overflow answer rustup toolchain install stable-x86_64-pc-windows-gnu


rustup target add x86_64-pc-windows-gnu
rustup toolchain install stable-x86_64-pc-windows-gnu
cargo build --target x86_64-pc-windows-gnu
sudo apt-get install mingw-w64

But when compiling its failing at the last stage with this error

error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1

 = 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 -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 -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 -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
          collect2: error: ld returned 1 exit status
          

error: aborting due to previous error; 2 warnings emitted

error: could not compile `project`

OS : Linux (Ubuntu)
rustc : 1.50.0
gtk-rs : 0.9.2 (features version 3_22, same as the host trying to compile)

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions