This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: includedir


Marijn Schouten (hkBst) wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list,

I was wondering why libffi doesn't install ffi.h and ffitarget.h in a place that
can be configured to be /usr/include. Instead it uses
$(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include.
This is because the header files are currently ABI dependent, and some systems support multiple ABIs. On Linux there are standards for installing libraries in ABI-dependent locations (like /usr/lib vs /usr/lib64), but not so much for header files.

Use pkg-config to find the header files like so...

$ pkg-config --cflags libffi
-I/usr/lib/libffi-3.0.1/include

$ gcc -c `pkg-config --cflags libffi` mycode.c

This should always work.

AG


Marijn

- --
Marijn Schouten (hkBst), Gentoo Lisp project, Gentoo ML
<http://www.gentoo.org/proj/en/lisp/>, #gentoo-{lisp,ml} on FreeNode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhk8aAACgkQp/VmCx0OL2zTlACdGg6Wuk0xaWhe9agjRjvGz+Fq
HScAn2ixoPJjbouJdpv0wSGx2yHPYvaz
=fwxW
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]