Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

If I were to write a library for a C-incompatible language (like D), where would be the best place to install my "header files" to?

usr/include seems like a bad idea, since the FHS says it's for "header files included by C programs."

share|improve this question

2 Answers 2

up vote 2 down vote accepted

You define your own conventions, but I'd indeed stay away from /usr/include.

/usr/lib/<lang> seems popular here for interpreted languages (I've at least /usr/lib/python, /usr/lib/perl and /usr/lib/ruby with variants for the handling of version specific stuff) I think that /usr/share/<lang> is more proper from the FHS (I've also /usr/share/tcl with a symbolic link from /usr/lib/tcl) if there is no binary data there (or at least only architecture independent binary data).

Still in the FHS spirit, I'd tend to use /opt/<lang>/share or /opt/<lang>/lib while providing the installer (or the distribution) an easy way to use /usr/share/<lang> or /usr/lib/<lang>.

share|improve this answer
1  
I'd say '/usr/lib/<lang>/include'. 1+ –  Eli Rosencruft Apr 17 '12 at 13:38

I'd say /usr/local/include/ for your own additions. Linux Filesystem Hierarchy Standard

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.