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
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
You can create and maintain your own static libraries very easily by using the ar (for archive) programand compiling functions separately with gcc -c.
*/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
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
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
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
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
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
❑ Flexibility: You can’t anticipate exactly how ingeniously users will use your program. Try to beas flexible as possible in your programming. Try to
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
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
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
The C CompilerOn POSIX-compliant systems, the C compiler is called c89. Historically, the C compiler was simplycalled cc. Over the years, different ve
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
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