Updated import paths in docs, examples.

This commit is contained in:
Ferdinand Majerech 2013-12-17 15:14:44 +01:00
parent d475077a68
commit ab9ba7f5ba
8 changed files with 19 additions and 18 deletions

View file

@ -147,22 +147,23 @@ Compiling
To compile your project, DMD needs to know which directories contain the To compile your project, DMD needs to know which directories contain the
imported modules and the library. You also need to tell it to link with D:YAML. imported modules and the library. You also need to tell it to link with D:YAML.
The import directory should be the D:YAML package directory. You can specify it The import directory should be the ``source`` subdirectory of the D:YAML
using the ``-I`` option of DMD. The library directory should point to the directory. You can specify it using the ``-I`` option of DMD. The library
compiled library. On Unix/Linux you can specify it using the ``-L-L`` option, directory should point to the compiled library. On Unix/Linux you can specify
and link with D:YAML using the ``-L-l`` option. On Windows, the import directory it using the ``-L-L`` option, and link with D:YAML using the ``-L-l`` option.
is used as the library directory. To link with the library on Windows, just add On Windows, the import directory is used as the library directory. To link with
the path to it relative to the current directory. the library on Windows, just add the path to it relative to the current
directory.
For example, if you extracted and compiled D:YAML in ``/home/xxx/dyaml``, your For example, if you extracted and compiled D:YAML in ``/home/xxx/dyaml``, your
project is in ``/home/xxx/dyaml-project``, and you are currently in that project is in ``/home/xxx/dyaml-project``, and you are currently in that
directory, compile the project with the following command on Unix/Linux:: directory, compile the project with the following command on Unix/Linux::
dmd -I../dyaml -L-L../dyaml -L-ldyaml main.d dmd -I../dyaml/source -L-L../dyaml -L-ldyaml main.d
And the following on Windows:: And the following on Windows::
dmd -I../dyaml ../dyaml/libdyaml.lib main.d dmd -I../dyaml/source ../dyaml/libdyaml.lib main.d
This will produce an executable called ``main`` or ``main.exe`` in your This will produce an executable called ``main`` or ``main.exe`` in your
directory. When you run it, it should produce the following output:: directory. When you run it, it should produce the following output::

View file

@ -1,5 +1,5 @@
main: main:
dmd -w -I../../ -L-L../../ -L-ldyaml main.d dmd -w -I../../source -L-L../../ -L-ldyaml main.d
clean: clean:
rm main main.o rm main main.o

View file

@ -1,5 +1,5 @@
main: main:
dmd -w -I../../ -L-L../../ -L-ldyaml main.d dmd -w -I../../source -L-L../../ -L-ldyaml main.d
clean: clean:
rm main main.o rm main main.o

View file

@ -1,5 +1,5 @@
main: main:
dmd -w -I../../ -L-L../../ -L-ldyaml main.d dmd -w -I../../source -L-L../../ -L-ldyaml main.d
clean: clean:
rm main main.o rm main main.o

View file

@ -1,5 +1,5 @@
main: main:
dmd -w -I../../ -L-L../../ -L-ldyaml main.d dmd -w -I../../source -L-L../../ -L-ldyaml main.d
clean: clean:
rm main main.o rm main main.o

View file

@ -1,5 +1,5 @@
main: main:
dmd -w -gc -I../../ -L-L../../ -L-ldyaml yaml_bench.d dmd -w -gc -I../../source -L-L../../ -L-ldyaml yaml_bench.d
clean: clean:
rm yaml_bench yaml_bench.o rm yaml_bench yaml_bench.o

View file

@ -1,5 +1,5 @@
main: main:
dmd -w -I../../ -L-L../../ -L-ldyaml yaml_gen.d dmd -w -I../../source -L-L../../ -L-ldyaml yaml_gen.d
clean: clean:
rm yaml_gen yaml_gen.o rm yaml_gen yaml_gen.o

View file

@ -1,5 +1,5 @@
main: main:
dmd -w -I../../ -L-L../../ -L-ldyaml yaml_stats.d dmd -w -I../../source -L-L../../ -L-ldyaml yaml_stats.d
clean: clean:
rm yaml_stats yaml_stats.o rm yaml_stats yaml_stats.o