Skip to content

Instantly share code, notes, and snippets.

@pietroppeter
Last active February 15, 2021 15:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pietroppeter/80266c634b22b3861273089dab3e1af2 to your computer and use it in GitHub Desktop.
Save pietroppeter/80266c634b22b3861273089dab3e1af2 to your computer and use it in GitHub Desktop.
Cairo dependencies for Windows (to use ggplotnim on Windows)

A common issue while trying to use https://github.com/Vindaar/ggplotnim on Windows is the fact that it is not easy to satisfy the full list of dll for Cairo.

In an issue (Vindaar/ggplotnim#57) and related gist (https://gist.github.com/Vindaar/6cb4e93baff3e1ab88a7ab7ed1ae5686) one of the best options seems to be to install emacs and add its bin folder to the path.

Using a dll dependency analyzer (https://github.com/lucasg/Dependencies, found through SO: https://stackoverflow.com/questions/7378959/how-to-check-for-dll-dependency), I was able to list all the dlls required, which are the following 17 files (including libcairo-2.dll, total around 9MB).

So another solution instead of installing emacs is to download the dlls (see link to libcairo-deps.rar in comment) and copy them in ~\.nimble\bin.

List of all recursive dependencies for libcairo-2.dll:

  • libbz2-1.dll
  • libcairo-2.dll
  • libexpat-1.dll
  • libfontconfig-1.dll
  • libfreetype-6.dll
  • libgcc_s_seh-1.dll
  • libglib-2.0-0.dll
  • libgraphite2.dll
  • libharfbuzz-0.dll
  • libiconv-2.dll
  • libintl-8.dll
  • libpcre-1.dll
  • libpixman-1-0.dll
  • libpng16-16.dll
  • libstdc++-6.dll
  • libwinpthread-1.dll
  • zlib1.dll
@pietroppeter
Copy link
Author

@pietroppeter
Copy link
Author

now referenced in ggplotnim.README https://github.com/Vindaar/ggplotnim#windows

personally, I agree with Vindaar that the best option to have libcairo in windows is the single standalone dll.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment