Chapter 1: Programming in LinuxIn This Chapter✓ Figuring out programming✓ Exploring the software-development tools in Linux✓ Compiling and linking pro
536Exploring the Software-Development Tools in LinuxTable 1-1 (continued)Option Meaning-fPICGenerates position-independent code (PIC) suitable for use
Book VIIIChapter 1Programming in Linux537Exploring the Software-Development Tools in LinuxThe GNU make utilityWhen an application is made up of more t
538Exploring the Software-Development Tools in LinuxSuppose that you have a C++ source file named form.C that contains the following preprocessor dire
Book VIIIChapter 1Programming in Linux539Exploring the Software-Development Tools in LinuxThis rule specifies an abstract target named clean that does
540Exploring the Software-Development Tools in LinuxTable 1-2 (continued)Variable Meaning$?Names of all dependent files (with spaces between the names
Book VIIIChapter 1Programming in Linux541Exploring the Software-Development Tools in Linux########################################################## S
542Exploring the Software-Development Tools in LinuxEven when you have a makefile with a default name such as Makefile, you may want to build a specif
Book VIIIChapter 1Programming in Linux543Exploring the Software-Development Tools in LinuxOption Meaning-mIgnores the variable given but accepts that
544Exploring the Software-Development Tools in LinuxPreparing to debug a programIf you want to debug a program by using gdb, you have to ensure that t
Book VIIIChapter 1Programming in Linux545Exploring the Software-Development Tools in LinuxTo quit gdb, type q and then press Enter.gdb has a large num
528An Overview of ProgrammingFigure 1-1 shows a simplified view of a computer, highlighting the major parts that are important to a programmer. Figure
546Exploring the Software-Development Tools in LinuxTable 1-4 (continued)info varDisplays all global and static variable names.killEnds the program yo
Book VIIIChapter 1Programming in Linux547Exploring the Software-Development Tools in Linux#include <stdio.h>static char buf[256];void read_input
548Exploring the Software-Development Tools in Linux 2. Start executing the program under gdb by typing the run command. When the program prompts for
Book VIIIChapter 1Programming in Linux549Exploring the Software-Development Tools in Linux At this point, you can narrow the problem to the variabl
550Understanding the Implications of GNU LicensesUnderstanding the Implications of GNU LicensesYou have to pay a price for the bounty of Linux. To pro
Book VIIIChapter 1Programming in Linux551Understanding the Implications of GNU LicensesThe software that the GPL covers isn’t in the public domain. So
552Understanding the Implications of GNU LicensesThe LGPL is intended to allow use of libraries in your applications, even if you don’t distribute sou
Book VIIIChapter 1Programming in Linux529An Overview of ProgrammingFor a programmer, the other two important items are the input and the output — the
530An Overview of Programmingone or more options — the command is the first word in the line and the rest are the options (specific behaviors for the
Book VIIIChapter 1Programming in Linux531Exploring the Software-Development Tools in LinuxThese steps are referred to as the edit-compile-debug cycle
532Exploring the Software-Development Tools in Linux ✦ A debugger for debugging programs. Linux includes the GNU debugger gdb. ✦ A version-control sys
Book VIIIChapter 1Programming in Linux533Exploring the Software-Development Tools in Linuxaccomplish this use the following program source; the task t
534Exploring the Software-Development Tools in LinuxIf you have too many source files to compile and link, you can compile the files individually and
Book VIIIChapter 1Programming in Linux535Exploring the Software-Development Tools in LinuxA host of GCC options controls various aspects of compiling
Commenti su questo manuale