From ab9ba7f5baef175baa6a51a929cba59e3cdae0d4 Mon Sep 17 00:00:00 2001 From: Ferdinand Majerech Date: Tue, 17 Dec 2013 15:14:44 +0100 Subject: [PATCH] Updated import paths in docs, examples. --- docsrc/tutorials/getting_started.rst | 23 ++++++++++++----------- examples/constructor/Makefile | 2 +- examples/getting_started/Makefile | 2 +- examples/representer/Makefile | 2 +- examples/resolver/Makefile | 2 +- examples/yaml_bench/Makefile | 2 +- examples/yaml_gen/Makefile | 2 +- examples/yaml_stats/Makefile | 2 +- 8 files changed, 19 insertions(+), 18 deletions(-) diff --git a/docsrc/tutorials/getting_started.rst b/docsrc/tutorials/getting_started.rst index 9cb7911..0abdc87 100644 --- a/docsrc/tutorials/getting_started.rst +++ b/docsrc/tutorials/getting_started.rst @@ -145,30 +145,31 @@ formatted differently. Comments are not preserved, either. Compiling ^^^^^^^^^ -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. -The import directory should be the D:YAML package directory. You can specify it -using the ``-I`` option of DMD. The library directory should point to the -compiled library. On Unix/Linux you can specify it using the ``-L-L`` option, -and link with D:YAML using the ``-L-l`` option. On Windows, the import directory -is used as the library directory. To link with the library on Windows, just add -the path to it relative to the current directory. +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. +The import directory should be the ``source`` subdirectory of the D:YAML +directory. You can specify it using the ``-I`` option of DMD. The library +directory should point to the compiled library. On Unix/Linux you can specify +it using the ``-L-L`` option, and link with D:YAML using the ``-L-l`` option. +On Windows, the import directory is used as the library directory. To link with +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 project is in ``/home/xxx/dyaml-project``, and you are currently in that 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:: - 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 directory. When you run it, it should produce the following output:: Hello - World + World The answer is 42 diff --git a/examples/constructor/Makefile b/examples/constructor/Makefile index 2bf433d..54baccf 100644 --- a/examples/constructor/Makefile +++ b/examples/constructor/Makefile @@ -1,5 +1,5 @@ main: - dmd -w -I../../ -L-L../../ -L-ldyaml main.d + dmd -w -I../../source -L-L../../ -L-ldyaml main.d clean: rm main main.o diff --git a/examples/getting_started/Makefile b/examples/getting_started/Makefile index 2bf433d..54baccf 100644 --- a/examples/getting_started/Makefile +++ b/examples/getting_started/Makefile @@ -1,5 +1,5 @@ main: - dmd -w -I../../ -L-L../../ -L-ldyaml main.d + dmd -w -I../../source -L-L../../ -L-ldyaml main.d clean: rm main main.o diff --git a/examples/representer/Makefile b/examples/representer/Makefile index 2bf433d..54baccf 100644 --- a/examples/representer/Makefile +++ b/examples/representer/Makefile @@ -1,5 +1,5 @@ main: - dmd -w -I../../ -L-L../../ -L-ldyaml main.d + dmd -w -I../../source -L-L../../ -L-ldyaml main.d clean: rm main main.o diff --git a/examples/resolver/Makefile b/examples/resolver/Makefile index 2bf433d..54baccf 100644 --- a/examples/resolver/Makefile +++ b/examples/resolver/Makefile @@ -1,5 +1,5 @@ main: - dmd -w -I../../ -L-L../../ -L-ldyaml main.d + dmd -w -I../../source -L-L../../ -L-ldyaml main.d clean: rm main main.o diff --git a/examples/yaml_bench/Makefile b/examples/yaml_bench/Makefile index 3aacd69..7c8006f 100644 --- a/examples/yaml_bench/Makefile +++ b/examples/yaml_bench/Makefile @@ -1,5 +1,5 @@ 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: rm yaml_bench yaml_bench.o diff --git a/examples/yaml_gen/Makefile b/examples/yaml_gen/Makefile index 0f19a8d..4b41102 100644 --- a/examples/yaml_gen/Makefile +++ b/examples/yaml_gen/Makefile @@ -1,5 +1,5 @@ main: - dmd -w -I../../ -L-L../../ -L-ldyaml yaml_gen.d + dmd -w -I../../source -L-L../../ -L-ldyaml yaml_gen.d clean: rm yaml_gen yaml_gen.o diff --git a/examples/yaml_stats/Makefile b/examples/yaml_stats/Makefile index 9d7fd96..82092a5 100644 --- a/examples/yaml_stats/Makefile +++ b/examples/yaml_stats/Makefile @@ -1,5 +1,5 @@ main: - dmd -w -I../../ -L-L../../ -L-ldyaml yaml_stats.d + dmd -w -I../../source -L-L../../ -L-ldyaml yaml_stats.d clean: rm yaml_stats yaml_stats.o