pkg-config

set PKG_CONFIG_PATH in cmake

陌路散爱 提交于 2020-01-01 08:49:07
问题 I have built opencv locally and installed it to a local directory ( not the system default ). The opencv.pc is present under a folder pkgconfig in this local folder. How can I find this opencv.pc from cmake, because I want to link and include opencv files from my program. pkg_search_module(<PREFIX> [REQUIRED] [QUIET] <MODULE> [<MODULE>]*) does not have any parameter in which I can force the command to use a specific path ( similiar to HINTS with find_package() ) and not the system default. So

How to specify dependency on external C library in .cabal?

蓝咒 提交于 2019-12-30 02:03:26
问题 I maintain a library with FFI bindings on Hackage. So my Haskell library depends on the corresponding C library and its header files. Now I specify the external dependency in the .cabal file like this: PkgConfig-Depends: libfoo >= 1.2 And it works well for me in Linux. However, I have a user of the library who reports, that installing pkg-config on Windows is rather cumbersome, and instead he prefers Includes: foo.h Extra-libraries: foo I'd like my library to be as easy to build as possible,

How to specify dependency on external C library in .cabal?

风流意气都作罢 提交于 2019-12-30 02:03:25
问题 I maintain a library with FFI bindings on Hackage. So my Haskell library depends on the corresponding C library and its header files. Now I specify the external dependency in the .cabal file like this: PkgConfig-Depends: libfoo >= 1.2 And it works well for me in Linux. However, I have a user of the library who reports, that installing pkg-config on Windows is rather cumbersome, and instead he prefers Includes: foo.h Extra-libraries: foo I'd like my library to be as easy to build as possible,

How to add a library's .pc file to a specific directory?

半腔热情 提交于 2019-12-25 04:49:25
问题 How can I add a newly installed library's .pc file to pkg-config 's path. In my experience this happens automatically, but not with recently installed opencv3 via homebrew . Most of my libraries' .pc files are in /usr/local/lib/pkgconfig (including opencv ), but not opencv3 The library opencv3 exists in /usr/local/cellar , and does have a opencv.pc in /usr/local/cellar/opencv3/3.1.0_4/lib/pkgconfig . Now I need pkg-config to find it, but I think it makes more sense to add this .pc to an

gtkmm: Simple example fails to compile: gtkmm.h: No such file or directory

丶灬走出姿态 提交于 2019-12-24 19:20:01
问题 I am working through the gtkmm documentation. I have started by trying to compile the "Simple Example". Here is the code. It can also be found here. /// SimpleExample.cpp #include <gtkmm.h> int main(int argc, char *argv[]) { auto app = Gtk::Application::create(argc, argv, "org.gtkmm.examples.base"); Gtk::Window window; window.set_default_size(200, 200); return app->run(window); } I have tried to compile this using g++ SimpleExample.cpp -o SimpleExample `pkg-config gtkmm-3.0 --cflags --libs`

pkg-config cant find libraries on ffmpeg build (linux)

ⅰ亾dé卋堺 提交于 2019-12-24 17:52:26
问题 I'm trying to build ffmpeg for android on ubuntu... -I've cross-compiled all the dependencies I need for my configuration -I've set up the configuration parameters but ./configure keep saying ERROR: librtmp not found using pkg-config I've tested and if I remove --enable-librtmp it will configure complain about other library. The thing is I i build all libs myself. So I'm sure it is present and at right folder. I'm not linux/compiler specialist and so far i've spend more than 10 days to get

pkg-config cant find libraries on ffmpeg build (linux)

余生颓废 提交于 2019-12-24 17:51:31
问题 I'm trying to build ffmpeg for android on ubuntu... -I've cross-compiled all the dependencies I need for my configuration -I've set up the configuration parameters but ./configure keep saying ERROR: librtmp not found using pkg-config I've tested and if I remove --enable-librtmp it will configure complain about other library. The thing is I i build all libs myself. So I'm sure it is present and at right folder. I'm not linux/compiler specialist and so far i've spend more than 10 days to get

Unable to link against BFD [duplicate]

假装没事ソ 提交于 2019-12-24 07:26:32
问题 This question already has answers here : Trying to include a library, but keep getting 'undefined reference to' messages (3 answers) Closed 5 years ago . I am trying to include this file in my project: http://cairo.sourcearchive.com/documentation/1.9.4/backtrace-symbols_8c-source.html But it requires linking against BFD. I have both binutils and binutils-devel installed. I have tried linking with -lbfd as well as directly to /usr/lib64/libbfd.so and /usr/lib64/libbfd.a (which both do exist).

Query pkg-config variable through autotools

☆樱花仙子☆ 提交于 2019-12-23 16:18:46
问题 To install a catalog file, I'd like to get the directory for Glade (an UI designer) like so: $ pkg-config --variable=catalogdir gladeui-2.0 /usr/share/glade/catalogs but in a variable inside my Makefile.am. Is there a (portable) way to do this? 回答1: Get this value in configure.ac . I think the latest version of pkg-config is 0.28. Let's assume that 0.25 or above is good enough: configure.ac ... PKG_PROG_PKG_CONFIG([0.25]) # check and set $PKG_CONFIG PKG_CHECK_MODULES([GLADEUI],[gladeui-2.0],

Using the pkg-config macro PKG_CHECK_MODULES failing

强颜欢笑 提交于 2019-12-23 07:27:15
问题 I'm sure this is a fairly simple problem. I have a very simple configure.ac file which I am using to just learn how autoconf & pkg-config work together. The confgure.ac file looks like: AC_PREREQ(2.61) AC_INIT(autoconf_test, 1.0, nowhere@dev.null) PKG_CHECK_MODULES(libusbmuxd, libusbmuxd >= 0.1.4) I can then execute autoconf from the command line and it does produce a configure script. However, when I run the configure script, I get the following error: ./configure: line 1618: syntax error