www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Conventions for installing third party libraries?

reply Jonathan Sternberg <jonathansternberg gmail.com> writes:
I know for C/C++, include files are usually placed in <prefix>/include and
libraries in <prefix>/lib. What's the convention for D files (as the module
files would need to be given for imports and I'm assuming that you don't
recompile the D files for every project).

Where are these files typically placed on a normal Linux installation?
Jun 06 2011
parent Jonathan M Davis <jmdavisProg gmx.com> writes:
On 2011-06-06 18:56, Jonathan Sternberg wrote:
 I know for C/C++, include files are usually placed in <prefix>/include and
 libraries in <prefix>/lib. What's the convention for D files (as the module
 files would need to be given for imports and I'm assuming that you don't
 recompile the D files for every project).
 
 Where are these files typically placed on a normal Linux installation?
I don't think that there _are_ any D libraries in a typical Linux installation. Some distros have dmd in their repositories, so then you get druntime and Phobos, but beyond that, I'm not aware of any D libraries in any distros. And where dmd and the standard libraries go is entirely up to the distro. They just have to make sure that the dmd.conf that they provide points to them. You can look at the deb and rpm packages on www.digitalmars.com to see where they put it. But as for libraries beyond the standard ones, I believe that they typically get built by the people who use them. If the project in question is set up to be a library as opposed to just providing the soure files, then it may be that people build that library and then reuse it betwen projects, but that's entirely up to the people using them. D isn't mainstream enough yet for Linux to really have a standard way of dealing with where to put its libraries and source files. Personally, I don't even install dmd or Phobos on my system. I just set up my path to point to where I unzipped dmd to, and it works. I then have the code for each of my projects in my projects. But I don't currently use any libraries beyond druntime and Phobos. - Jonathan M Davis
Jun 06 2011