On 2011-07-18 18:03, Johannes Pfau wrote:
It would be possible to install libraries into the dmd default search
path. Right now, this would be /usr/include/d/dmd and library files
in /usr/lib on posix, but any path can be used as long as it's included
in dmd.conf. However, this means that only one version of a library can
be installed system-wide, so it's not optimal.

It should also be noted, that linking against a specific library
version can only work well with static libraries. With static libraries
you can give linker a specific path to the library at compile time
(So you can have multiple versions in different directories). Using
different directories with dynamic libraries requires setting
LD_LIBRARY_PATH before executing a program, so this won't work. We'll
have to use the library versioning mechanism that's used by C
libraries (e.g for linux:
http://www.ibm.com/developerworks/linux/library/l-shlibs/index.html ).
I don't know if windows even supports library versioning, but as
windows programs usually don't install dlls globally that's less of a
problem.

You can give a specific path to the compiler with dynamic libraries as well. Link with libfoo, version 3.4.0:

dmd -L-L/path/to/libfoo-3.4.0 -L-lfoo

Or have I missed something?

--
/Jacob Carlborg

Reply via email to