Red_Hat_Enterprise_Linux-7-Developer_Guide-en-US.pdf

(5614 KB) Pobierz
Red Hat Enterprise Linux 7
Developer Guide
An introduction to application development tools in Red Hat Enterprise
Linux 7
Red Hat Subject Matter ExpertsDave Brolley
William Cohen
Roland Grunberg
Karsten Hopp
Jakub Jelinek
Benjamin Kosnik
Chris Moller
Alex Kurtakov
Charley Wang
Kent Sebastian
Aldy Hernandez
Jeff Johnston
Phil Muldoon
Development Community
Red Hat Enterprise Linux 7 Developer Guide
An introduction to application development tools in Red Hat Enterprise
Linux 7
Dave Bro lley
Red Hat Engineering To o ls Develo pment
bro lley@redhat.co m
Pro filing
William Co hen
Red Hat Engineering To o ls Develo pment
wco hen@redhat.co m
Pro filing
Ro land Grunberg
Red Hat Engineering To o ls Develo pment
rgrunber@redhat.co m
Eclipse and Eclipse plug-ins
Aldy Hernandez
Red Hat Engineering To o ls Develo pment
aldyh@redhat.co m
Co mpiling and Building
Karsten Ho pp
Base Operating System Co re Services - BRNO
karsten@redhat.co m
Co mpiling
Jakub Jelinek
Red Hat Engineering To o ls Develo pment
jakub@redhat.co m
Pro filing
Jeff Jo hnsto n
Red Hat Engineering To o ls Develo pment
jjo hnstn@redhat.co m
Eclipse and Eclipse plug-ins
Benjamin Ko snik
Red Hat Engineering To o ls Develo pment
bko z@redhat.co m
Libraries and Runtime Suppo rt
Chris Mo ller
Red Hat Engineering To o ls Develo pment
cmo ller@redhat.co m
Debugging
Phil Muldo o n
Red Hat Engineering To o ls Develo pment
pmuldo o n@redhat.co m
Debugging
Alex Kurtako v
Red Hat Engineering To o ls Develo pment
akurtako @redhat.co m
Eclipse and Eclipse plug-ins
Legal Notice
Charley Wang
Copyright © 2012 Red Hat, Inc. and others.
Red Hat Engineering To o ls Develo pment
cwang@redhat.co m
T his document is
plug-ins
by Red Hat under the
Creative Commons Attribution-ShareAlike 3.0 Unported
licensed
Eclipse and Eclipse
License.
If you distribute this document, or a modified version of it, you must provide attribution to Red
Hat, Inc. and
Kent Sebastian
provide a link to the original. If the document is modified, all Red Hat trademarks must be
kent.k.sebastian@gmail.co m
removed.
Pro filing
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section
Red Hat Subject Matter Experts
4d of CC-BY-SA to the fullest extent permitted by applicable law.
Develo pment Co mmunity
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo,
and RHCE
Edited by
are trademarks of Red Hat, Inc., registered in the United States and other countries.
Jacquelynn East
Linux ® is the
ntent Services
registered trademark of Linus T orvalds in the United States and other countries.
Engineering Co
jeast@redhat.co m
Java ® is a registered trademark of Oracle and/or its affiliates.
Do n Do mingo
XFS
Hat
is a trademark
ntent Services
Red
®
Engineering Co
of Silicon Graphics International Corp. or its subsidiaries in the United States
ddo mingo @redhat.co m
and/or other countries.
MySQL ® is a registered trademark of MySQL AB in the United States, the European Union and other
countries.
Node.js ® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or
endorsed by the official Joyent Node.js open source or commercial project.
T he OpenStack ® Word Mark and OpenStack Logo are either registered trademarks/service marks or
trademarks/service marks of the OpenStack Foundation, in the United States and other countries and
are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or
sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
Abstract
T his document describes the different features and utilities that make Red Hat Enterprise Linux 7 an
ideal enterprise platform for application development. It focuses on Eclipse as an end-to-end integrated
development environment (IDE), but also includes command line tools and other utilities outside Eclipse.
Table of Contents
Table of Contents
C . . . . . . . Eclipse Development . . . . . . . . . . .
. .hapter. 1. . . . . . . . . . . . . . . . . . . . .Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 . . . . . . . .
.
1.1. Starting an Eclipse project
3
1.2. Eclipse User Interface
6
1.3. Editing C/C++ Source Code in Eclipse
15
1.4. Editing Java Source Code in Eclipse
18
1.5. Eclipse RPM Building
19
1.6. Eclipse Documentation
20
C . . . . . . . Collaborating
. .hapter. 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 . . . . . . . .
..
2.1. Concurrent Versions System (CVS)
23
2.2. Apache Subversion (SVN)
25
2.3. Git
31
C . . . . . . . . . . . . . . . . . . . . . . . . . Support
. .hapter. 3. Libraries .and .Runtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3 . . . . . . . .
..
3.1. Version Information
43
3.2. Compatibility
44
3.3. Library and Runtime Details
45
C . . . . . . . . . . . . . . . and . . . . . . .
. .hapter. 4 . . Compiling . . . . Building. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 . . . . . . . .
..
4 .1. GNU Compiler Collection (GCC)
72
4 .2. Distributed Compiling
96
4 .3. Autotools
96
4 .4. Eclipse Built-in Specfile Editor
98
4 .5. CDT in Eclipse
98
4 .6. build-id Unique Identification of Binaries
99
4 .7. Software Collections and scl-utils
100
C . . . . . . . Debugging
. .hapter. 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .102 . . . . . . . .
...
5.1. ELF Executable Binaries
102
5.2. Installing Debuginfo Packages
103
5.3. GDB
106
5.4. Variable T racking at Assignments
117
5.5. Python Pretty-Printers
118
5.6. Debugging C/C++ Applications with Eclipse
120
C . . . . . . . Profiling
. .hapter. 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .122 . . . . . . . .
...
6.1. Valgrind
122
6.2. OProfile
125
6.3. SystemT ap
129
6.4. Performance Counters for Linux (PCL) T ools and perf
132
6.5. ftrace
135
C . . . . . . . Red Hat . . . . . . . . . . . . . . .
. .hapter. 7. . . . . . . . . Developer .T oolset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 . . . . . . . .
...
7.1. Red Hat Developer T oolset Features
137
7.2. Changes in binutils
138
7.3. Platform Compatibility
143
7.4. Red Hat Developer T oolset References
143
C . . . . . . . Red Hat . . . . . . . . . . . . . . . . .
. .hapter. 8. . . . . . . . . Software .Collections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14 5 . . . . . . . .
...
8.1. Red Hat Software Collections Features
145
8.2. Platform Compatibility
146
8.3. Red Hat Software Collections Use
146
8.4. Deploy Applications T hat Use Red Hat Software Collections
147
8.5. Where to Find More Information?
147
C . . . . . . . . . . . . . . . . . . . . . ools
. .hapter. 9. .Documentation. T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14 8 . . . . . . . .
...
1
Zgłoś jeśli naruszono regulamin