Skip to content

Some *.dll not found in Win10 (e.g. libcairo-gobject-2.dll) #1

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

Open
asteding opened this issue Nov 17, 2019 · 5 comments
Open

Some *.dll not found in Win10 (e.g. libcairo-gobject-2.dll) #1

asteding opened this issue Nov 17, 2019 · 5 comments

Comments

@asteding
Copy link

asteding commented Nov 17, 2019

Hello @NoraCodes
i stumbled arcross your post and thought i might give it a try since i need to crosscompile from linux to windows.

I followed the instruction on your repo and build a windows *.exe of the gtk-rs minimum example found at their page. Sadly if i try start the *.exe on my Windows 10 (x64) i get several errors at startup.
E.g.

  • libcairo-gobject-2.dll not found
  • libgdk-3-0.dll not found
  • libgdk_pixbuf-2.0.0.dll not found

What am i doing wrong? I'd like the approach and if it's simple to use i'd switch to rust for my next little project instead of a PyQt GUI.

Thanks for any help, have a nice day.

@olback
Copy link

olback commented Nov 29, 2019

Take a look here: https://gtk-rs.org/docs-src/tutorial/cross#packaging

You need to include the dlls from the docker container. They are located in /usr/x86_64-w64-mingw32/sys-root/mingw/bin.

Edit: I made two new docker images to be able to compile Rust GTK-3 applications for Linux and Windows on CircleCI. You can find examples here: https://github.com/olback/dockerimages/tree/master/dockerfiles

@arifd
Copy link

arifd commented Apr 14, 2021

I just compiled my first gtk-rs app natively in Windows, but had the same problem when I tried to distribute the .exe to another Windows machine. Is there a way to bundle the .dlls into the executable?

@NoraCodes
Copy link
Owner

You can use an application packing framework or create an MSI installer to distribute the DLLs.

@arifd
Copy link

arifd commented May 3, 2021

Thanks @NoraCodes, I meant statically bundle the libs, but yes i guess creating an installer works too. Thanks for everything you do!

@NoraCodes
Copy link
Owner

Absolutely! I think it is possible to statically bundle them, but better not to because a lot of people will already have them installed, so if you provide an installer that checks for them you can reduce install size and update burden.

Best of luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants