Wiley 978-0-470-14762-7 Datasheet

Browse online or download Datasheet for Software manuals Wiley 978-0-470-14762-7. Wiley Beginning Linux Programming, 4th Edition User Manual

  • Download
  • Add to my manuals
  • Print
  • Page
    / 16
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 0
1
Getting Started
In this chapter, you discover what Linux is and how it relates to its inspiration, UNIX. You take a
guided tour of the facilities provided by a Linux development system, and write and run your first
program. Along the way, you’ll be looking at
UNIX, Linux, and GNU
Programs and programming languages for Linux
How to locate development resources
Static and shared libraries
The UNIX philosophy
An Introduction to UNIX, Linux, and GNU
In recent years Linux has become a phenomenon. Hardly a day goes by without Linux cropping
up in the media in some way. We’ve lost count of the number of applications that have been made
available on Linux and the number of organizations that have adopted it, including some govern-
ment departments and city administrations. Major hardware vendors like IBM and Dell now sup-
port Linux, and major software vendors like Oracle support their software running on Linux.
Linux truly has become a viable operating system, especially in the server market.
Linux owes its success to systems and applications that preceded it: UNIX and GNU software.
This section looks at how Linux came to be and what its roots are.
What Is UNIX?
The UNIX operating system was originally developed at Bell Laboratories, once part of the
telecommunications giant AT&T. Designed in the 1970s for Digital Equipment PDP computers,
UNIX has become a very popular multiuser, multitasking operating system for a wide variety of
hardware platforms, from PC workstations to multiprocessor servers and supercomputers.
47627c01.qxd:WroxPro 9/28/07 8:56 PM Page 1
COPYRIGHTED MATERIAL
Page view 0
1 2 3 4 5 6 ... 15 16

Summary of Contents

Page 1 - COPYRIGHTED MATERIAL

1Getting StartedIn this chapter, you discover what Linux is and how it relates to its inspiration, UNIX. You take aguided tour of the facilities provi

Page 2

Standard system libraries are usually stored in /lib and /usr/lib. The C compiler (or more exactly, thelinker) needs to be told which libraries to sea

Page 3 - What Is Linux?

You can create and maintain your own static libraries very easily by using the ar (for archive) programand compiling functions separately with gcc -c.

Page 4 - Programming Linux

*/void bill(char *);void fred(int);4. The calling program (program.c) can be very simple. It includes the library header file andcalls one of the func

Page 5 - Linux Programs

Your library is now ready to use. You can add to the list of files to be used by the compiler to create yourprogram like this:$ gcc -o program program

Page 6 - Text Editors

In this way, the system can arrange for a single copy of a shared library to be used by many applicationsat once and stored just once on the disk. An

Page 7 - The C Compiler

the emacs editor. The benefit of the info system is that you can navigate the documentation using linksand cross-references to jump directly to releva

Page 8 - Development System Roadmap

2. To get more information on GNU C, you can try info.$ info gccFile: gcc.info, Node: Top, Next: G++ and GCC, Up: (DIR)Introduction************This

Page 9

A Brief History of UNIXStrictly, UNIX is a trademark administered by The Open Group, and it refers to a computer operatingsystem that conforms to a pa

Page 10 - Chapter 1: Getting Started

❑ Flexibility: You can’t anticipate exactly how ingeniously users will use your program. Try to beas flexible as possible in your programming. Try to

Page 11

A few major examples of software from the GNU Project distributed under the GPL follow:❑ GCC: The GNU Compiler Collection, containing the GNU C compil

Page 12

Linux programmers, or UNIX programmers for that matter. In the course of the book, we’ll mention acouple of the alternatives.A vast range of programmi

Page 13

searching for a file with the same name in a given set of directories. The directories to search are storedin a shell variable, PATH, in much the same

Page 14 - Getting Help

The C CompilerOn POSIX-compliant systems, the C compiler is called c89. Historically, the C compiler was simplycalled cc. Over the years, different ve

Page 15

How It WorksYou invoked the GNU C compiler (on Linux this will most likely be available as cc too) that translatedthe C source code into an executable

Page 16

The GNU compiler system’s driver program, gcc (which you used in the preceding programmingexample), is typically located in /usr/bin or /usr/local/bin

Comments to this Manuals

No comments