C Environment settings
Local Environment settings
If you want to set up the C locale, you need to make sure that you have the following two available software, text editor, and C compiler on your computer.
Text Editor
This will be used to enter your program. Text editors include Windows Notepad, OS Edit command, Brief, Epsilon, EMACS, and Vim/vi.
The name and version of a text editor may differ on different operating systems. For example, Notepad is typically used on Windows operating systems, and VIM/VI can be used on Windows and Linux/unix operating systems.
Files created through the editor are often called source files, and source files contain program source code. The source files of the C program typically use the extension ". C".
Before you start programming, make sure you have a text editor with enough experience to write a computer program and then save it in a file and compile and execute it.
C compiler
Sources written in source files are human-readable sources. It needs to be "compiled" and converted to machine language so that the CPU can execute the program according to the given instruction.
The C language compiler is used to compile the source code into a final executable program. This assumes that you have a basic understanding of the programming language compiler.
The most commonly used free compilers are the GNU C + + compiler, and if you are using HP or Solaris, you can use the compilers on your respective operating systems.
The following sections will guide you on how to install the GNU/C + + compiler on different operating systems. The reference to C/C + + is mentioned here, mainly because the GNU gcc compiler is suitable for both the C. programming languages.
Installation on the Unix/linux
If you are using Linux or UNIX, use the following command at the command line to check to see if GCC is installed on your system:
$ gcc-v
If the GNU compiler is already installed on your computer, the following message appears:
Using built-in specs.
Target:i386-redhat-linux
configured with:. /configure--prefix=/usr
..... Thread model:posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)
If you do not have GCC installed, follow the instructions on http://gcc.gnu.org/install/to install GCC.
This tutorial is based on Linux and all given instances have been compiled on the Cent OS Linux system.
Installation on Mac OS
If you are using Mac OS X, the quickest way to get GCC is to download the Xcode development environment from Apple's website and install it according to the installation instructions.
Once the Xcode is installed, you will be able to use the GNU compiler.
Xcode can now be downloaded from developer.apple.com/technologies/tools/.
Installation on Windows
In order to install GCC on Windows, you need to install MinGW. to install MinGW, visit the MinGW homepage www.mingw.org, go to the MinGW download page, download the latest version of the MinGW installer, named Format Mingw-<version>.exe.
When you install MINWG, you must install at least Gcc-core, gcc-g++, Binutils, and MinGW runtime, but more items will normally be installed.
Add the MinGW bin subdirectory of your installation to your PATH environment variable so that you can specify these tools on the command line with a simple name.
When the installation is complete, you can run GCC, g++, AR, Ranlib, Dlltool, and some other GNU tools from the Windows command line.
The above is the C language environment settings of the data collation, follow-up to continue to collate relevant information, hoping to help students learn C language.