Basic knowledge of the GCC compiler

Source: Internet
Author: User

Description

Here I only talk about the most basic things. After all, I just started using Linux. And I don't have any good notes to use, so I thought I would simply write a blog. But written blog there is the risk of being seen by others, but it doesn't matter, I mainly write to myself to see, so you see Hostler hair, if not written well, please forgive me.

1. View version

1 GCC -version2gcc4.8. 3 20140627

2. Store the compiled file in the same directory as the. C Script

gcc avril.c-o./lav

This compiles the AVRIL.C under the ~/script/into the lav file in the same directory. Unlike Windows,linux, which does not need the suffix of the executable file, it is too lazy to add.

If the./lav is written as LAV, then a script directory is created in the script directory and the compiled file is inside. So you can understand that this is the script directory.

3. Run this file

If you enter LAV directly, you will be prompted with an error. and Windows is no problem. Here to enter./lav.

Or you can enter the full path and put it in quotation marks (or drag and drop files directly to the console):

' /home/abram/script/lav '

So I understand why./lav. Because the full path (./lav equivalent) is required to run the executable file, the direct input lav,linux will look for the environment variable.

Basic knowledge of the GCC compiler

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.