diff options
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ecpg.sgml | 9 | ||||
-rw-r--r-- | doc/src/sgml/libpq.sgml | 21 |
2 files changed, 30 insertions, 0 deletions
diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml index 4d904cdeb88..68bcb13ca04 100644 --- a/doc/src/sgml/ecpg.sgml +++ b/doc/src/sgml/ecpg.sgml @@ -5715,6 +5715,15 @@ cc -o myprog prog1.o prog2.o ... -lecpg </para> <para> + You can + use <command>pg_config</command><indexterm><primary>pg_config</primary><secondary sortas="ecpg">with + ecpg</secondary></indexterm> + or <command>pkg-config</command><indexterm><primary>pkg-config</primary><secondary sortas="ecpg">with + ecpg</secondary></indexterm> with package name <literal>libecpg</literal> to + get the paths for your installation. + </para> + + <para> If you manage the build process of a larger project using <application>make</application>, it might be convenient to include the following implicit rule to your makefiles: diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index 1a09c1cb8da..3b6ada08f7c 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -7641,6 +7641,18 @@ CPPFLAGS += -I/usr/local/pgsql/include </para> <para> + If you + have <command>pkg-config</command><indexterm><primary>pkg-config</primary><secondary sortas="libpq">with + libpq</secondary></indexterm> installed, you can run instead: +<screen> +<prompt>$</prompt> pkg-config --cflags libpq +<computeroutput>-I/usr/local/include</computeroutput> +</screen> + Note that this will already include the <option>-I</option> in front of + the path. + </para> + + <para> Failure to specify the correct option to the compiler will result in an error message such as: <screen> @@ -7675,6 +7687,15 @@ cc -o testprog testprog1.o testprog2.o -L/usr/local/pgsql/lib -lpq </para> <para> + Or again use <command>pkg-config</command>: +<screen> +<prompt>$</prompt> pkg-config --libs libpq +<computeroutput>-L/usr/local/pgsql/lib -lpq</computeroutput> +</screen> + Note again that this prints the full options, not only the path. + </para> + + <para> Error messages that point to problems in this area could look like the following: <screen> |