Installing Modules

Johannes Pfau nospam at example.com
Thu Mar 29 01:55:41 PDT 2012


Am Thu, 29 Mar 2012 06:15:07 +0200
schrieb "TJB" <broughtj at gmail.com>:

> 
> Thank you for your patience with me.  I now have the following 
> simple test code:
> 
> import scid.matrix;
> 
> void main() {}
> 
> Then I run and get the following error:
> 
> $ dmd -I/usr/local/src main.d

The command Jesse posted is missing a "-L-lscid" and you'll probably
also need "-L-L/usr/local/lib"
So the complete command should be:

dmd -I/usr/local/src -L-L/usr/local/lib -L-lscid main.d

Here's a short explanation of those flags:
the "-L" prefix tells dmd to ignore this argument and pass it to the
linker(ld). So in our case, "-lscid" and "-L/usr/local/lib" are passed
to the linker. "-l" means link in a library, here 'scid'. The linker
appends the 'lib' prefix and 'a' suffix for you, so it searches for a
'libscid.a' file. "-L" (passed to the linker!) adds a directory to the
library search path. These are the directories which are searched by the
linker when looking for the 'libscid.a' file.



More information about the Digitalmars-d-learn mailing list