In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "how to set up the C language environment". In the operation of actual cases, many people will encounter such a dilemma. Then let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
C environment settin
Local environment settings
If you want to set up the C language environment, you need to make sure that there are two software available on your computer, a text editor and a C compiler.
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 the text editor may vary from operating system to operating system. For example, Notepad is commonly used on the Windows operating system, and vim/vi can be used on the Linux/UNIX operating system.
A file created through an editor is often called a source file, which contains the program source code. The source file of a C program usually uses the extension .c.
Before you start programming, make sure you have a text editor and have enough experience to write a computer program, then save it in a file, compile and execute it.
C compiler
The source code written in the source file is a human readable source. It needs to be "compiled" and converted to machine language so that CPU can execute the program according to the given instructions.
The C language compiler is used to compile source code into a final executable program. It is assumed that you already have a basic understanding of programming language compilers.
The most commonly used freely available compiler is GNU's Cmax Candle + compiler, and if you are using HP or Solaris, you can use a compiler on your respective operating system.
The following sections will guide you on how to install GNU's Cmax Clipper + compiler on different operating systems. It is also mentioned here that the gcc compiler of GNU is suitable for C and C++ programming languages.
Installation on UNIX/Linux
If you are using Linux or UNIX, use the following command on the command line to check if GCC is installed on your system:
$gcc-v
If you already have a GNU compiler installed on your computer, the following message is displayed:
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 GCC is not installed, follow the detailed instructions on http://gcc.gnu.org/install/ to install GCC.
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 documentation. Once Xcode is installed, you can use the GNU compiler.
Xcode is currently available for download 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 MinGW's home page www.mingw.org, go to the MinGW download page, and download the latest version of the MinGW installer named MinGW-.exe.
When installing MinGW, you need to install at least gcc-core, gcc-g++, binutils, and MinGW runtime, but generally install more of the rest.
Add the bin subdirectory of your installed MinGW to your PATH environment variable so that you can specify these tools by simple names on the command line.
When the installation is complete, you can run gcc, Gmail +, ar, ranlib, dlltool, and the rest of the few GNU tools from the Windows command line.
This is the end of the content of "how to set up C language Environment". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.