Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




NOTE: CentOS Enterprise Linux is built from the Red Hat Enterprise Linux source code. Other than logo and name changes CentOS Enterprise Linux is compatible with the equivalent Red Hat version. This document applies equally to both Red Hat and CentOS Enterprise Linux.

Chapter 3. Developing with Red Hat Enterprise Linux Developer Tools

Use the tutorials in this chapter to learn about standard native development with the tools.

See for details about the tools.

3.1. Create Source Code

To start, create the following sample source code file and save it as hello.c. The following sections show you how to compile this file to form an executable and how to run it.

#include <stdio.h>

int a, c;

static void
foo (int b)
  c = a + b;
  printf ("%d + %d = %d\n", a, b, c);

main (void)
  int b;

  a = 3;
  b = 4;

  printf ("Hello, world!\n");

  foo (b);

  return 0;

Example 3-1. Source code to save as hello.c

  Published under the terms of the GNU General Public License Design by Interspire