You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I post this in gtk-rs-core, because I have successfully used cairo in the past with C++ on Windows.
I'm trying to compile a simple program in Rust and I need to use the cairo library. cairo has been successfully compiled and installed with gvsbuild, C:\gtk-build\gtk\x64\release\bin is in my PATH and PKG_CONFIG_PATH is set to C:\gtk-build\gtk\x64\release\lib\pkgconfig. If I launch the command (on a Windows terminal):
Everything is indicating that cairo is installed on my machine, and pkg-config is correctly configured. I've added cairo-rs to my Rust project like this:
[dependencies]
cairo-rs = { version = "0.18.5", features = ["svg", "png"] }
If I do cargo build, then I get the following error:
The system library `cairo` required by crate `cairo-sys-rs` was not found.
The file `cairo.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
PKG_CONFIG_PATH contains the following:
- C
- \gtk-build\gtk\x64\release\lib\pkgconfig
HINT: you may need to install a package such as cairo, cairo-dev or cairo-devel.
However, cairo.pc exists in the pkgconfig folder, I really don't understand why cargo is unable to find cairo. Any pointers ?
This discussion was converted from issue #1284 on April 25, 2024 10:28.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I post this in gtk-rs-core, because I have successfully used cairo in the past with C++ on Windows.
I'm trying to compile a simple program in Rust and I need to use the cairo library.
cairo
has been successfully compiled and installed withgvsbuild
,C:\gtk-build\gtk\x64\release\bin
is in my PATH andPKG_CONFIG_PATH
is set toC:\gtk-build\gtk\x64\release\lib\pkgconfig
. If I launch the command (on a Windows terminal):Everything is indicating that cairo is installed on my machine, and
pkg-config
is correctly configured. I've added cairo-rs to my Rust project like this:If I do
cargo build
, then I get the following error:However,
cairo.pc
exists in the pkgconfig folder, I really don't understand why cargo is unable to find cairo. Any pointers ?Thanks
Beta Was this translation helpful? Give feedback.
All reactions