Reputation: 6051
I'm trying to run pkg-config
on my 64bits elementary (ubuntu 14.04) from a .net gui application and it says that it doesn't find my packages that are found when I run the exact command from a terminal.
For reference, here's the command:
pkg-config --cflags --libs glib-2.0 gobject-2.0
Using the PKG_CONFIG_DEBUG_SPEW
I managed to get detailed debug info for pkg-config and it looks like it initializes itself differently in the two cases.
Initialization in .net gui application:
Adding directory '/usr/share/pkgconfig' from PKG_CONFIG_PATH
Adding directory '/usr/lib/pkgconfig' from PKG_CONFIG_PATH
Initialization in terminal:
Adding directory '/usr/local/lib/x86_64-linux-gnu/pkgconfig' from PKG_CONFIG_PATH
Adding directory '/usr/local/lib/pkgconfig' from PKG_CONFIG_PATH
Adding directory '/usr/local/share/pkgconfig' from PKG_CONFIG_PATH
Adding directory '/usr/lib/x86_64-linux-gnu/pkgconfig' from PKG_CONFIG_PATH
Adding directory '/usr/lib/pkgconfig' from PKG_CONFIG_PATH
Adding directory '/usr/share/pkgconfig' from PKG_CONFIG_PATH
Of course my libraries are defined in the missing directory '/usr/lib/x86_64-linux-gnu/pkgconfig' that is not added in the .net gui application.
Why are the two initializations different?
How can I tell pkg-config to initialize the same it does in the terminal?
Note: I know that I can set the
PKG_CONFIG_PATH
before calling pkg-config but I would prefer a simpler solution if available.
Upvotes: 4
Views: 4002
Reputation: 17492
Note: I know that I can set the PKG_CONFIG_PATH before calling pkg-config but I would prefer a simpler solution if available.
Nope, that's how to do it. That said, both /usr/share/pkgconfig
and /usr/lib/pkgconfig
are in your search path already, so I'm not sure what you hope to achieve.
Upvotes: 1