Archive for December, 2007

Chapter 29 . Programming Tools and Utilities 787 (Web server info)

Friday, December 21st, 2007

Chapter 29 . Programming Tools and Utilities 787 Using the GCC Compiler The GNU Compiler Collection (GCC) is by far the most dominant compiler (rather, the most dominant collection of compilers) used on Linux systems. It compiles programs written in C, C++, Objective-C, Fortran, Java, and Ada. This chapter focuses on the C compiler. GCC gives programmers extensive control over the compilation process. That process includes up to four stages: preprocessing, compilation, assembly, and linking. You can stop the process after any of these stages to examine the compiler s output at that stage. GCC can also handle the various C dialects, such as ANSI C or traditional (Kernighan and Ritchie) C. You can control the amount and type of debugging information, if any, to embed in the resulting binary. And like most compilers, GCC also performs code optimization. The gcc command invokes the C compiler. To use it, provide it the name of a C source file and use its -o option to specify the name of the output file. gcc will preprocess, compile, assemble, and link the program, generating an executable, often called a binary. Here s the simplest syntax: gcc infile.c [-o outfile] infile.c is a C source code file and -o says to name the output file outfile. The [] characters indicate optional arguments throughout this book. If the name of the output file is not specified, gcc names the output file a.out by default. The following example uses gcc to create the hello program from the source file hello.c. First, the source code: /* * hello.c - canonical hello world program */ #include int main(int argc, char *argv[]) { printf( Hello, Linux programming world!n ); return 0; } Now, to compile and run this program, type $ gcc hello.c -o hello If all goes well, gcc does its job silently and returns to the shell prompt. It compiles and links the source file hello.c (gcc hello.c), creating a binary named hello, as specified using the -o hello argument.
We recommend you use shared web hosting services, because many users agree that it is cheap, reliable and customer-satisfying webhost.

786 Part VI . Programming in Linux This (Web hosting isp)

Thursday, December 20th, 2007

786 Part VI . Programming in Linux This chapter discusses the most popular programs and utilities of their types. In most cases, alternatives (and sometimes multiple alternatives) exist, but I cover only one to keep the discussion simple (I try to mention the others just so you re familiar with their names). What constitutes a well-stocked Linux development toolkit? The basics include an editor to write the code, one or more compilers to turn source code into binaries, and a debugger to track down the inevitable bugs. Most people have a favorite editor, and you d have a difficult time trying to persuade them to try a new one. Most editors support some set of programming-related functionality (some more than others, to be sure). There are too many to cover in this space, so suffice it to say: You ll need an editor. Perhaps the most popular editors are vi and emacs. Vi is a commercial editor, being part of the commercial UNIX offerings, so what you can actually get is usually a clone such as vim, elvis, or (my own personal favorite) nvi (new vi). I prefer nvi because it is a port of vi from BSD UNIX to Linux. Other popular editors include pico (the Pine mail client editor made available as a separate program), jed, joe, jove, and nano. If you prefer graphical editors, gedit in GNOME and kedit in KDE also provide basic programming support. Chapter 2 has a short tutorial on using the vi editor, as well as short descriptions of several other popular open source text editors. When it comes to compilers, GCC is the compiler of choice, or, if you will, the choice of the GNU generation, so this chapter discusses only GCC. Other compilers are available for Linux, such as Intel s C and C++ compiler and a very powerful (and expensive) offering from the Portland Compiler Group. Similarly, GDB, the GNU debugger, is the only debugger described in this chapter. In Chapter 28 you examined the role that programming interfaces play in simplifying the development task. Interfaces usually include one or more libraries that implement the functionality that interfaces define. Because you need to be able to work with programming libraries, utilities for creating, examining, and manipulating libraries also occupy the well-stocked programming toolkit. To this list, most developers would add a build automation tool, such as make, because most non-trivial projects need some sort of utility that handles building and rebuilding complicated, multi-file projects with a minimum of effort and time. Another challenge for large projects is tracking source code changes and maintaining a record of what code changed, when it changed, how it changed, and who changed it. This task is the province of source code control systems, and this chapter looks at two: RCS and CVS. Cross- Reference
Please visit our professional web hosting services to find out about cheap and reliable webhost service that will surely answer all your demands.

Programming Tools and (Database web hosting) Utilities The preceding chapter, Programming

Wednesday, December 19th, 2007

Programming Tools and Utilities The preceding chapter, Programming Environments and Interfaces, provided a high-level view of Linux programming, focusing on the overall development environment and introducing the idioms that give programming on a Linux system its distinctive character. This chapter goes into greater detail and describes some of the tools and toys found on a typical Linux development system. The goal of this chapter is not to turn you into a developer in 30 pages or less, but simply to explore some of the variety of tools developers use so you will at least know what they are and what they do. You ll also learn how to use some of the programs and utilities. The Well-Stocked Toolkit Whether you prefer a graphical development environment or the classic command-line environment, you need a good set of tools if you want to write, compile, and debug programs for Linux. The good news is that Linux has plenty of editors, compilers, and debuggers from which to choose. The bad news is that Linux has plenty of editors, compilers, and debuggers from which to choose. The range of programming tool options is good news for developers because they can pick the best and most appropriate tools for the development task at hand. The proliferation of choices is bad news for system administrators who need to install and maintain the tools and for people who evaluate the tools. Too many choices make choosing the right one a difficult task. 2C H A9P9T E R . . . . In This Chapter Using the GCC compiler Automating builds with make Examining library utilities Exploring source code control Debugging with GDB . . . .
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.

Freelance web design - Chapter 28 . Programming Environments and Interfaces 783

Tuesday, December 18th, 2007

Chapter 28 . Programming Environments and Interfaces 783 This chapter looked at both graphical programming IDEs and the less visually attractive but just as powerful command-line or text-mode programming environments. You also learned some of the characteristics of Linux and of Linux systems that define and shape programming and programs on and for Linux. The second part of the chapter looked at the variety of programming interfaces, the methods available for getting particular programming tasks done. You learned that you can create text-mode or command-line interfaces and that you can choose from a variety of graphical interfaces for structuring user interaction with your program. Finally, you took a fast-paced look at some of the many APIs that make it possible to do a variety of things, such as manipulate or create images or interact with a database. . . .
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.

782 Part VI . Programming in Linux Table (Web site)

Tuesday, December 18th, 2007

782 Part VI . Programming in Linux Table 28-1 (continued) API Category Description pilot-link PalmOS pilot-link implements a library for communicating with Palm handheld devices and with other devices that adhere to the PalmOS interface standard. gnome-pilot and KPilot use pilot-link. popt General popt is a C library for parsing command-line parameters. popt was heavily influenced by the getopt() and getopt_long() functions, but improves on them by allowing more powerful argument expansion and allows command-line arguments to be aliased via configuration files. sdl Multimedia The Simple DirectMedia Layer (SDL) provides a generic, cross-platform API for low-level access to audio, keyboards, mice, joysticks, 3D hardware via OpenGL, and 2D framebuffers. t1lib Graphics t1lib provides an API for generating character and string glyphs from Adobe Type 1 fonts. taglib Audio TagLib is a library for reading and editing the meta-data stored in ID3v1 and ID3v2 (MP3 files) and Ogg Vorbis comments and ID3 tags (Ogg Vorbis files). zlib Data zlib provides a general-purpose, thread-safe data Compression compression library that implements the data formats defined by RFC1950, RFC1951, and RFC1952 (see www.ietf.org/rfc.html to find any of the RFCs just mentioned). As you can see, a wide variety of APIs exist for performing an equally wide variety of programming tasks. Chances are pretty good that if you need to perform some sort of programming task, someone has written a library that you can use to do it. Summary The phrase Linux programming environments and interfaces is shorthand that masks a rich set of features, which, taken together, only partially characterize the activity of programming on a Linux system.
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.

Chapter 28 . Programming Environments and Interfaces 781 (Ipower web hosting)

Monday, December 17th, 2007

Chapter 28 . Programming Environments and Interfaces 781 API Category Description libpng Graphics The Portable Network Graphics (PNG) standard is an extensible file format for the lossless, portable, wellcompressed storage of images. PNG provides a patent-free replacement for GIF. libtermcap Hardware libtermcap implements the GNU termcap library API, a library of C functions that enable programs to send control strings to terminals in a way independent of the terminal type. libtiff 2-D Graphics The TIFF library provides an API for working with images stored in the Tag Image File Format (TIFF), a widely used format for storing high-quality, high-resolution images. libungif 2-D Graphics libungif provides an API unencumbered by patents for loading and saving images in GIF format. libusb Hardware libusb allows user space application access to USB devices. libvorbis Audio This library supports the Vorbis General Audio Compression Codec, commonly known as Ogg Vorbis. Ogg Vorbis is an open, patent-and-royalty-free, general-purpose compressed audio format for audio and music. libwmf Graphics libwmf provides an API for interpreting, displaying, and converting metafile images to standard image formats such as PNG, JPEG, PS, EPS, and SVG. libxml2 XML libxml2 is the XML parser library used by GNOME and KDE. libxslt XML libxslt provides XSLT support for libxml2. XSLT is a language used to transform XML documents into other formats. orbit CORBA ORBit is a high-performance Common Object Request Broker Architecture (CORBA) object request broker (ORB). ORBit allows programs to send requests and receive replies from other programs, regardless of the locations of the two programs. GNOME uses ORBit heavily. pango Text layout Pango is a library for layout and rendering of text, with an emphasis on internationalization. Pango forms the core of text and font handling in GTK+-2.0. pcre Regular The Perl-compatible regular expression (PCRE) library expressions implements an API for regular expression pattern matching that uses the same syntax and semantics as Perl 5. The PCRE library is used by many programs. Continued
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

Photography web hosting - 780 Part VI . Programming in Linux Table

Saturday, December 15th, 2007

780 Part VI . Programming in Linux Table 28-1 (continued) API Category Description imlib Graphics ImLib (image library) is an image loading and rendering API designed to simplify and speed up the process of loading images and obtaining X Window System. libao Audio libao is a cross-platform audio library used by other libraries and programs that use audio, including ogg123, GAIM, and the Ogg Vorbis libraries. libart_lgpl 2-D Graphics Libart is a library for high-performance 2D graphics used by KDE and GNOME. libexif Graphics This library provides an API allowing programs to read, parse, edit, and save Exchangeable Image File Format (EXIF) data in image files. EXIF is a format used to store extra information in images, such as the JPEG files produced by digital cameras. libglade Graphics The GLADE library, used heavily in GNOME programs, allows programs to load user interfaces from definitions stored in external files. This allows the interface to be changed without recompiling the program. libid3tag Audio libid3tag is a library for reading ID3 tags. ID3 tags allow extra information to be embedded in audio files. libieee1284 Hardware libieee1284 enables applications that need to communicate with (or at least identify) devices that are attached via IEEE1284-compliant parallel ports, such as scanners. libjpeg Graphics The JPEG library provides a rich API for manipulating JPEGformat images, including reading, writing, converting, compressing, and decompressing images. libmad Audio libmad provides a high-quality MPEG audio decoder API. libmad provides full 24-bit PCM output, so applications using this API can produce high quality audio. libmng Graphics libmng implements the Multiple-image Network Graphics (MNG) API. MNG provides multi-image animation capabilities similar to animated GIFs, but free of patent encumbrances. libogg Audio Libogg is a library for reading and writing ogg format bitstreams. libogg is needed to use the Ogg Vorbis audio format.
In case you need quality webspace to host and run your web applications, try our personal web hosting services.

Web hosting script - Chapter 28 . Programming Environments and Interfaces 779

Friday, December 14th, 2007

Chapter 28 . Programming Environments and Interfaces 779 Table 28-1 Common Linux APIs API Category Description aalib ASCII art AA-lib is an ASCII art graphics library output as ASCII art. arts Sound The analog realtime synthesizer (aRts) is KDE s core sound system, designed to create and process sound using small specialized modules. These modules might create a waveform, play samples, filter data, add signals, perform effects (such as delay, flanger, or chorus), or output the data to the soundcard. atk Accessibility atk is a library of accessibility functions used by GNOME. audiofile Audio audiofile, used by the esound daemon (Enlightened Sound Daemon), is a library for processing various audio file formats. You can also use it to develop your own audio file based applications. db4 Database The Berkeley Database (Berkeley DB) library enables developers to create applications with database support. expat XML Expat is a stream-oriented C library for parsing XML. It is used by Python, GNOME, Xft2, and other applications. gdbm Database The GNU Database Manager (GDBM) is a set of database routines that work similarly to the standard UNIX dbm routines. gdk-pixbuf 2-D Graphics GdkPixbuf is an API for loading, scaling, compositing, and animating images. GdkPixBuf is required by many GTK+ programs. glib General GLib is a general purpose API of C language routines. The library includes support for features such as lists, trees, hashes, memory allocation, and many other things. GLib is required by almost every GTK+ application. glut 3-D Graphics The GL Utility Toolkit (GLUT) is a 3D graphics library based on the OpenGL API. It provides a higher-level interface for creation of OpenGL-based graphics. gmp Mathematics The GNU Multiple Precision (GMP) API implements a library for arbitrary precision arithmetic, such as operations on signed integers, rational numbers, and floating-point numbers. gnet Network GNet is an object-oriented library of network routines. Written in C and based on the GLib library, GNet is used by gnomeicu and Pan. Continued
You want to have a cheap webhost for your apache application, then check apache web hosting services.

778 Part VI (Email web hosting) . Programming in Linux .

Thursday, December 13th, 2007

778 Part VI . Programming in Linux . Xlib Xlib is shorthand for the X library, a low-level, C-based interface to the raw X Window System protocol. If you want to write as close to the X graphics core as possible, you write Xlib-based programs. Indeed, most window managers, widget libraries, and GUI toolkits are written using Xlib function. While using straight Xlib gives you the best performance, it is extremely code intensive. Xlib is an essential ingredient of the standard X distribution. You can learn more about Xlib from the HTML manual page, available on the Web at www.the-labs.com/X11/XLib-Manual. . Xt Xt Intrinsics are a very thin layer of functions and data structures on top of Xlib. Xt Intrinsics create an object-oriented interface that C programs can use to create graphical elements. Without other widget sets, the Intrinsics are not especially useful. Xt, like Xlib, is a part of the standard X distribution and is not available separately. Application Programming Interfaces Application programming interfaces, or APIs, provide programmers with libraries of code for performing certain tasks. There are many APIs, probably as many as there are types of programming problems that need to be solved. The ncurses library, for example, provides an API that you can use to create text-mode user interfaces. In turn, ncurses works by using either the terminfo or termcap API to perform the actual screen updates in a manner consistent with the underlying type of display device in use. Developers keep having to perform a specific type of programming task, such as updating a database, communicating over a network, getting sound out of a sound card, or performing complicated mathematical calculations. As a result, there is at least one database API, socket API, sound API, or mathematical API already in existence that they can use to simplify those tasks. APIs consist of three components: . Header file Declares the interface (the function calls, macros, and data structures) the developers can use in their own programs. . One or more library files Implement(s) the interfaces declared in the header files and against which programs must be linked. . API documentation Describes how to use the API and often provides example code. The documentation might be provided in manual pages, text files, HTML files, GNU TeXinfo files, or some combination of all of these formats. Table 28-1 describes many popular or widely used APIs, but the list provided here is far from complete.
From our experience, we are can tell you that you can find a reliable and cheap webhost service at Java Web Hosting services.

Chapter 28 . Programming Environments and Interfaces 777 (Web site management)

Thursday, December 13th, 2007

Chapter 28 . Programming Environments and Interfaces 777 programming languages, such as Perl, C++, and Python, so you can use GTK+ features in many programming environments. Because of the limited space available, this chapter does not show examples of Qt and GTK+ applications. For more information about GTK+, visit the GTK+ Web site at www.gtk.org. You can find information about the Qt framework at www.trolltech.no. Although Qt and GTK+ are the big hammers of Linux graphical development, there are many other toolkits, frameworks, and libraries that you can use to develop GUIbased applications for Linux. The following list, arranged alphabetically, describes some of the most common ones. Most of these toolkits and frameworks describe widget sets, which are implemented in one or more programming libraries. Widget is the term applied to a user interface abstraction, such as a scrollbar or a button, created using the toolkit. . Athena The Athena library was one of the earliest widget libraries available for the X Window System. It was a thin layer of abstraction on top of raw Xlib calls that made it slightly less painful to create scrollbars, text entry boxes, and other typical GUI elements. It is part of the standard X11 distribution. . 3-D Athena Toolkit The 3D Athena Toolkit was a 3D version of the original Athena toolkit. It gave Athena a 3D look and was a considerable visual improvement over plain vanilla Athena. The 3D Athena toolkit, although no longer widely used, is still available on the Web at http://directory.fsf.org/ graphics/3d/xaw3d.html. . FLTK FLTK, which is pronounced full tick, is an acronym for the Fast Light Toolkit. FLTK is a GUI for X, Mac OS X, and Microsoft Windows. Written in C++, FLTK makes it possible to write GUIs that look almost identical regardless of the platform on which the GUI runs. FLTK also supports OpenGL graphics. You can find more information about FLTK on the Web at www.fltk.org. . XForms XForms is a GUI toolkit based on Xlib. It isn t highly configurable like the other GUI toolkits discussed in this section, but its simplicity makes XForms easier to use than the other graphical toolkits. It comes with a GUI builder that makes it fast and easy to get working application up and running. More information about XForms can be found on the Web at http://world.std.com/~xforms/. . OpenGL OpenGL is the industry-standard 3D graphics toolkit. It provides the most realistic and lifelike graphics currently available for the X Window System. It is generally available as part of XFree86. More information about OpenGL is available on the Web at www.opengl.org. . Motif Motif was one of the first widget or interface toolkits available for the X Window System that combined both an interface toolkit and a window manager. Originally available only as a commercial product, it is now available in an open source version at www.openmotif.org. Note
Visit our web design programs services for an affordable and reliable webhost to suit all your needs.