📄 16-building programs.mht
字号:
<P class=3DBody><A name=3DpgfId-998355></A>Click the files or =
directories you wish=20
to add to the project. Click <SPAN class=3DBold>OK</SPAN> when done. =
The names=20
of the added files or directory appear in the <SPAN =
class=3DBold>Project=20
Files</SPAN> list. </P></LI></OL>
<H4 class=3DHeading3><A name=3DpgfId-998358></A><A =
name=3Dmarker-998356></A><A=20
name=3D46396></A>Library Files tab</H4>
<P class=3DBody><A name=3DpgfId-998359></A>Most libraries required for =
building=20
targets are linked in automatically by the compiler/linker. If you know =
that=20
your target requires additional libraries, use the <SPAN =
class=3DBold>Library=20
Files</SPAN> tab to add them to your build.</P>
<P class=3DFigureTitle><A name=3DpgfId-998363></A>Library Files Tab</P>
<DIV><IMG=20
src=3D"http://sourcenav.sourceforge.net/online-docs/userguide/progide-8.g=
if">=20
</DIV>
<P class=3DBody><A name=3DpgfId-998366></A>Add <A =
name=3Dmarker-998364></A>additional=20
libraries by clicking the <A name=3Dmarker-998365></A><SPAN =
class=3DBold>Add</SPAN>=20
button. The <SPAN class=3DBold>Open</SPAN> dialog opens to the last =
directory you=20
have looked at in this project. After you select a library and click the =
<SPAN=20
class=3DBold>Open </SPAN>button, it appears in the library list.</P>
<P class=3DBody><A name=3DpgfId-998368></A>To remove a library from the =
listing,=20
select the library and click the <A name=3Dmarker-998367></A><SPAN=20
class=3DBold>Remove </SPAN>button. The library is removed from the =
build.</P>
<P class=3DBody><A name=3DpgfId-998369></A>Libraries are linked in the =
order listed=20
in the dialog. To change the order of libraries, select the library and =
click=20
either the <SPAN class=3DBold>Move Up</SPAN> or <SPAN class=3DBold>Move =
Down</SPAN>=20
button to change its linking order.</P>
<H4 class=3DHeading3><A name=3DpgfId-998372></A><A =
name=3Dmarker-998370></A><A=20
name=3D70492></A>Build Rules tab</H4>
<P class=3DBody><A name=3DpgfId-998373></A>Click the <SPAN =
class=3DBold>Build Rules=20
</SPAN>tab to configure each rule in the build target.</P>
<P class=3DBody><A name=3DpgfId-998375></A>A <A =
name=3Dmarker-998374></A>rule contains=20
information required to compile files in a project. For example, a rule =
to=20
compile a C file might contain information about which compiler and =
flags to=20
use, as well as what the file is called after it's compiled.</P>
<P class=3DBody><A name=3DpgfId-998376></A>This tab lists the rules for =
the=20
specified build target. Within the <SPAN class=3DBold>Build Rules</SPAN> =
tab, you=20
can:</P>
<UL>
<LI class=3DBullet>
<P class=3DBody><A name=3DpgfId-998377></A>disable and enable rules =
for the=20
target. </P>
<LI class=3DBullet>
<P class=3DBody><A name=3DpgfId-998378></A>edit existing rules. =
</P></LI></UL>
<P class=3DFigureTitle><A name=3DpgfId-998388></A>Build Rules Tab</P>
<DIV><IMG=20
src=3D"http://sourcenav.sourceforge.net/online-docs/userguide/progide-9.g=
if">=20
</DIV>
<H5 class=3DHeading4><A name=3DpgfId-998392></A>Status</H5>
<P class=3DBody><A name=3DpgfId-998394></A>This column shows the =
currently <A=20
name=3Dmarker-998393></A>enabled and disabled rules. To disable a rule, =
highlight=20
the rule and click the <SPAN class=3DBold>Disable</SPAN> button. To =
enable a rule,=20
highlight the rule and click the <SPAN class=3DBold>Enable</SPAN> =
button.</P>
<H3 class=3DLabel><A name=3DpgfId-998395></A>Note</H3>
<P class=3DNote><A name=3DpgfId-998396></A>This button changes between =
<SPAN=20
class=3DBold>Disable</SPAN> and <SPAN class=3DBold>Enable</SPAN> =
depending upon the=20
state of the rule.</P>
<H5 class=3DHeading4><A name=3DpgfId-998397></A>File Type</H5>
<P class=3DBody><A name=3DpgfId-998398></A>This column displays the type =
of file the=20
rule acts upon.</P>
<H5 class=3DHeading4><A name=3DpgfId-998400></A><A=20
name=3Dmarker-998399></A>Description</H5>
<P class=3DBody><A name=3DpgfId-998401></A>This column displays a =
description of the=20
rule.</P>
<H4 class=3DHeading3><A name=3DpgfId-998403></A><A =
name=3Dmarker-998402></A>Editing a=20
rule</H4>
<P class=3DBody><A name=3DpgfId-998404></A>To edit a rule, select the =
rule from the=20
rule listing. Click the <SPAN class=3DBold>Edit Rule</SPAN> button. The =
<SPAN=20
class=3DBold>Build Rule Settings</SPAN> dialog opens. The dialog title =
bar=20
displays the extension for the files involved.</P>
<H5 class=3DHeading4><A name=3DpgfId-998406></A><A =
name=3Dmarker-998405></A>Settings=20
tab</H5>
<P class=3DBody><A name=3DpgfId-998407></A>The <SPAN =
class=3DBold>Settings</SPAN> tab=20
allows you to change the default settings for the rule.</P>
<P class=3DFigureTitle><A name=3DpgfId-998414></A>Build Rule Settings =
with Options=20
Selected</P>
<DIV><IMG=20
src=3D"http://sourcenav.sourceforge.net/online-docs/userguide/progide-10.=
gif">=20
</DIV>
<P class=3DBody><A name=3DpgfId-998418></A>Debug:<BR>
<P class=3DBodyHang1>This controls the debug information generated by =
the=20
compiler.</P>
<P class=3DBody><A name=3DpgfId-998419></A>Warnings:<BR>
<P class=3DBodyHang1>Controls the level of warnings the compiler =
generates. A=20
stricter warning ensures fewer problems with future compatibility. Set =
"Warnings=20
as Errors" to make sure the compile stops any time a warning is =
generated.</P>
<P class=3DBody><A name=3DpgfId-998420></A>User flags:<BR>
<P class=3DBodyHang1>Enter flags not covered by the options listed in =
this screen.=20
To add macros, see <A class=3DXRef=20
href=3D"http://sourcenav.sourceforge.net/online-docs/userguide/progide.ht=
ml#92084">Defines=20
tab</A>.</P>
<P class=3DBody><A name=3DpgfId-998424></A>Optimization:<BR>
<P class=3DBodyHang1>Compiler optimization for the code.</P>
<P class=3DBody><A name=3DpgfId-998425></A>Code Generation:<BR>
<P class=3DBodyHang1>Processor or code control specific optimizations of =
settings.</P>
<P class=3DBody><A name=3DpgfId-998426></A>Executable:<BR>
<P class=3DBodyHang1>Selects the executable to use. To change the tool =
(such as=20
compiler) location, either enter the location path or click the "<SPAN=20
class=3DBold>...</SPAN>" button to choose the tool binary to use.</P>
<H5 class=3DHeading4><A name=3DpgfId-998428></A><A =
name=3Dmarker-998427></A>Includes=20
tab</H5>
<P class=3DBody><A name=3DpgfId-998429></A>Sometimes files include other =
files. In C=20
this is done with the <KBD class=3DCode>#include</KBD> statement. The =
<SPAN=20
class=3DBold>Includes</SPAN> tab allows you to change the included paths =
for the=20
rule.</P>
<P class=3DFigureTitle><A name=3DpgfId-998433></A>Includes Tab</P>
<DIV><IMG=20
src=3D"http://sourcenav.sourceforge.net/online-docs/userguide/progide-11.=
gif">=20
</DIV>
<P class=3DBody><A name=3DpgfId-998434></A>The <SPAN =
class=3DBold>Auto-Generated=20
Include Paths</SPAN> list displays paths generated from the =
Source-Navigator=20
database. </P>
<P class=3DBody><A name=3DpgfId-998442></A><A =
name=3Dmarker-998438></A>Click the <SPAN=20
class=3DBold>Generate</SPAN> button to generate a list of =
Source-Navigator=20
included paths. These appear in the <SPAN class=3DBold>Auto-Generated =
Include=20
Paths</SPAN> list.</P>
<P class=3DBody><A name=3DpgfId-998444></A>To add additional paths, =
click the <SPAN=20
class=3DBold>Add</SPAN> button. The selected paths appear in the <A=20
name=3Dmarker-998443></A><SPAN class=3DBold>User Specified Include =
Paths</SPAN>=20
list. You can delete paths by highlighting the path and clicking the =
<SPAN=20
class=3DBold>Delete</SPAN> button.</P>
<H5 class=3DHeading4><A name=3DpgfId-998447></A><A =
name=3Dmarker-998445></A><A=20
name=3D92084></A>Defines tab</H5>
<P class=3DBody><A name=3DpgfId-998448></A>The <SPAN =
class=3DBold>Defines</SPAN> tab=20
enables you to view, edit, and create new macro definitions.</P>
<P class=3DFigureTitle><A name=3DpgfId-998452></A>Defines Tab</P>
<DIV><IMG=20
src=3D"http://sourcenav.sourceforge.net/online-docs/userguide/progide-12.=
gif">=20
</DIV>
<H4 class=3DHeading3><A name=3DpgfId-998453></A>Modifying macro =
definitions</H4>
<P class=3DBody><A name=3DpgfId-998455></A>To create a <A =
name=3Dmarker-998454></A>new=20
macro, enter the name and definition in the text entry box and click the =
<SPAN=20
class=3DBold>New</SPAN> button.</P>
<P class=3DBody><A name=3DpgfId-998457></A>To change the <A=20
name=3Dmarker-998456></A>current macro definition, select the macro from =
the <SPAN=20
class=3DBold>Macro defines</SPAN> list. The macro appears in the text =
entry=20
box.</P>
<P class=3DFigureTitle><A name=3DpgfId-998461></A>Macro Created and =
Selected</P>
<DIV><IMG=20
src=3D"http://sourcenav.sourceforge.net/online-docs/userguide/progide-13.=
gif">=20
</DIV>
<P class=3DBody><A name=3DpgfId-998462></A>Make the necessary =
modifications to the=20
macro. </P>
<P class=3DBody><A name=3DpgfId-998463></A>To create a new macro, click =
the <SPAN=20
class=3DBold>New</SPAN> button. The new macro appears in the =
listing.</P>
<P class=3DBody><A name=3DpgfId-998464></A>To update the macro, click =
the <SPAN=20
class=3DBold>Change</SPAN> button. The modified macro appears in the =
listing.</P>
<P class=3DBody><A name=3DpgfId-998465></A>To delete a macro, select it =
from the=20
<SPAN class=3DBold>Macro defines</SPAN> list and click the <SPAN=20
class=3DBold>Delete</SPAN> button. The macro is removed from the =
listing.</P>
<H4 class=3DHeading3><A name=3DpgfId-998467></A><A name=3D51848></A>Link =
Rules=20
tab</H4>
<P class=3DBody><A name=3DpgfId-998469></A>The <SPAN class=3DBold>Link =
Rules</SPAN> <A=20
name=3D"Link Rules tab"></A>tab allows you to specify the program to =
execute and=20
the name of the final output file.</P>
<P class=3DFigureTitle><A name=3DpgfId-998479></A>Link Rules Tab of the =
Build=20
Targets Menu</P>
<DIV><IMG=20
src=3D"http://sourcenav.sourceforge.net/online-docs/userguide/progide-14.=
gif">=20
</DIV>
<P class=3DBody><A name=3DpgfId-998483></A>Output File:<BR>
<P class=3DBodyHang1>The name of the final output file.</P>
<P class=3DBody><A name=3DpgfId-998484></A>Linker:<BR>
<P class=3DBodyHang1>Auto-detects the type of project. Click the "<SPAN=20
class=3DBold>...</SPAN>" button to select another linker.</P>
<P class=3DBody><A name=3DpgfId-998485></A>Entry Point:<BR>
<P class=3DBodyHang1>This is the first function executed for the =
application.=20
Default is <KBD class=3DCode>main()</KBD>. In Java, you must specify the =
name of=20
the class that defines <KBD class=3DCode>main()</KBD>.</P>
<P class=3DBody><A name=3DpgfId-998486></A>Link flags:<BR>
<P class=3DBodyHang1>Displays the full link command line and allows you =
to add=20
flags, but you cannot edit existing links or flags.</P>
<P class=3DBody><A name=3DpgfId-998487></A><SPAN =
class=3DBold>Debug/Execute=20
Settings:</SPAN> </P>
<P class=3DBodyListFollow><A name=3DpgfId-998488></A>Controls the mode =
for the rule.=20
<SPAN class=3DBold>Execute</SPAN> allows running the program from the =
<SPAN=20
class=3DBold>Build</SPAN> window. <SPAN class=3DBold>Debug</SPAN> allows =
starting=20
the Insight debugger from the <SPAN class=3DBold>Build</SPAN> window. =
See <A=20
class=3DXRef=20
href=3D"http://sourcenav.sourceforge.net/online-docs/userguide/progide.ht=
ml#13755">Debugging=20
the build target</A> for more information on debugging your program.</P>
<P class=3DBody><A name=3DpgfId-998492></A>Command to launch =
Application:<BR>
<P class=3DBodyHang1>This field lists the name of the binary to execute =
or debug.=20
The default name is the file listed in <SPAN class=3DBold>Output =
File</SPAN>. If=20
you changed the default output file, you also need to change the name =
here. </P>
<P class=3DBodyListFollow><A name=3DpgfId-1002510></A>On UNIX, enter =
<KBD=20
class=3DCode>xterm -e</KBD> before the executable name if you are =
debugging a=20
console application.</P>
<P class=3DBody><A name=3DpgfId-998493></A>Click the <SPAN =
class=3DBold>OK</SPAN>=20
button to close the <SPAN class=3DBold>Edit Target</SPAN> dialog. Click =
the <SPAN=20
class=3DBold>Done</SPAN> button to close the <SPAN class=3DBold>Build=20
Settings</SPAN> dialog.</P>
<H2 class=3DHeading1><A name=3DpgfId-998496></A><A =
name=3Dmarker-998494></A><A=20
name=3D57216></A>Compiling Build Targets</H2>
<P class=3DBody><A name=3DpgfId-998497></A>After you have created and =
configured a=20
build target, you must build it. </P>
<P class=3DBody><A name=3DpgfId-998501></A>Source-Navigator can generate =
its own=20
<KBD class=3DCode>makefiles</KBD> or work with one that you supply.</P>
<H4 class=3DHeading3><A name=3DpgfId-998502></A>Internal build =
systems</H4>
<P class=3DBody><A name=3DpgfId-998506></A>To build your project using =
the=20
Source-Navigator build system:</P>
<OL>
<LI class=3DNumbered>
<P class=3DBody><A name=3DpgfId-998507></A>From the <SPAN =
class=3DBold>Tools</SPAN>=20
menu in the <SPAN class=3DBold>Symbol Browser</SPAN>, select <SPAN=20
class=3DBold>Build</SPAN>. </P>
<LI class=3DNumberedNext>
<P class=3DBody><A name=3DpgfId-998511></A>The <SPAN =
class=3DBold>Build</SPAN>=20
window opens.
<P>
<DIV><IMG=20
=
src=3D"http://sourcenav.sourceforge.net/online-docs/userguide/progide-15.=
gif">=20
</DIV>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -