/usr/share/help/ja/anjuta-manual/project-manager-library-add.page is in anjuta-common 2:3.10.2-0ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | <?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" type="topic" style="task" id="project-manager-library-add" xml:lang="ja">
<info xmlns:facet="http://projectmallard.org/facet/1.0/">
<facet:tag key="all-pages" value="whatever"/> <!--Include page in index-->
<link type="guide" xref="project-manager-library" group="sixth"/>
<link type="seealso" xref="project-manager-target"/>
<revision pkgversion="3.0" version="0.1" date="2011-03-27" status="incomplete"/>
<desc>
Add a custom library to a target.
</desc>
<credit type="author">
<name>Sébastien Granjoux</name>
<email>seb.sfo@free.fr</email>
</credit>
<credit type="editor">
<name>Philip Chimento</name>
<email>philip.chimento@gmail.com</email>
</credit>
</info>
<title>Add a Custom Library</title>
<p>It is easier to use a packaged library, which is common on Linux, so
check if it is the case <link xref="project-manager-module-new">here</link>.
But else you can still use the library as explained below.</p>
<p>In order to use a library in C, you need to tell the compiler
where the header files are, and tell the linker where to find the
needed libraries. The issue is that your program will not compile
on another computer if the header and the libraries are elsewhere.</p>
<steps>
<item>
<p>Select the directory containing the program where you want to
add the library in the <gui>project view</gui>, click on the
right mouse button to make the <gui>project context menu</gui>
appear and select <gui>Properties</gui>.</p>
<p>Or from the <gui>main menu</gui>, select <guiseq><gui>Project</gui>
<gui>Properties</gui></guiseq>. By default, it edits the
properties of the currently selected item in the project view.
You can select a different item in the drop-down list button.</p>
</item>
<item>
<p>If the header files are installed in a standard location
(<file>/usr/include</file>) you don't have to set this. If not,
you need to add <input>-I<var>include_path</var></input> in
the <gui>C preprocessor flags</gui> property if you are using
<app>gcc</app> as your compiler. You can add several paths separated with
spaces. These options will be used for all targets inside this
directory.</p>
<p>You might have to expand the <gui>More options</gui> button to see this.
Click on the <gui>Apply</gui> button when you are done.</p>
</item>
<item>
<p>Next, you need to add the library to a target.
Select the target where you want to
add the library in the <gui>project view</gui>, click on the
right mouse button to make the <gui>project context menu</gui>
appear and select <gui>Properties</gui>.</p>
<p>Or from the <gui>main menu</gui>, select <guiseq><gui>Project</gui>
<gui>Properties</gui></guiseq>. By default, it edits the
properties of the currently selected item in the project view.
You can select a different item in the drop-down list button.</p>
</item>
<item>
<p>You need to set the <gui>Linker flags</gui> property, adding
<input>-l<var>library_name</var></input> if your compiler is <app>gcc</app>.
<var>library_name</var> is the name of the library file without the
<file>lib</file> prefix and without the <file>.a</file> or
<file>.so</file> extension.</p>
<p>If the library is in not in a standard directory, <app>gcc</app>
can look in additional directories with the option
<input>-L<var>library_path</var></input>.</p>
</item>
</steps>
</page>
|