For Dummies Linux All-in-One, 4th Edition 978-0-470-77019-1 User Manual
Product codes
978-0-470-77019-1
Chapter 1: Programming in Linux
In This Chapter
✓
Figuring out programming
✓
Exploring the software-development tools in Linux
✓
Compiling and linking programs with GCC
✓
Using make
✓
Debugging programs with gdb
✓
Understanding the implications of GNU, GPL, and LGPL
L
inux comes loaded with all the tools you need to develop software. (All
you have to do is install them.) In particular, it has all the GNU soft-
you have to do is install them.) In particular, it has all the GNU soft-
ware-development tools, such as GCC (C and C++ compiler), GNU make, and
the GNU debugger. This chapter introduces you to programming, describes
the software-development tools, and shows you how to use them. Although
I provide examples in the C and C++ programming languages, the focus is
not on showing you how to program in those languages but on showing you
how to use various software-development tools (such as compilers, make,
and debugger).
the GNU debugger. This chapter introduces you to programming, describes
the software-development tools, and shows you how to use them. Although
I provide examples in the C and C++ programming languages, the focus is
not on showing you how to program in those languages but on showing you
how to use various software-development tools (such as compilers, make,
and debugger).
The chapter concludes with a brief explanation of how the Free Software
Foundation’s GNU General Public License (GPL) may affect any plans you
might have to develop Linux software. You need to know about the GPL
because you use GNU tools and GNU libraries to develop software in Linux.
Foundation’s GNU General Public License (GPL) may affect any plans you
might have to develop Linux software. You need to know about the GPL
because you use GNU tools and GNU libraries to develop software in Linux.
An Overview of Programming
If you’ve written computer programs in any programming language, you can
start writing programs on your Linux system quickly. If you’ve never written
a computer program, however, you need two basic resources before you
begin to write code: a look at the basics of programming and a quick review
of computers and their major parts. This section offers an overview of com-
puter programming — just enough to get you going.
start writing programs on your Linux system quickly. If you’ve never written
a computer program, however, you need two basic resources before you
begin to write code: a look at the basics of programming and a quick review
of computers and their major parts. This section offers an overview of com-
puter programming — just enough to get you going.
A simplified view of a computer
Before you get a feel for computer programming, you need to understand
where computer programs fit in with the overall scheme of computing.
where computer programs fit in with the overall scheme of computing.
42_770191-bk08ch01.indd 527
42_770191-bk08ch01.indd 527
8/6/10 9:51 AM
8/6/10 9:51 AM
COPYRIGHTED MATERIAL