Makefile file Error

Source: Internet
Author: User
Makefile file error-general Linux technology-Linux programming and kernel information. For more information, see. I learned C language on Fedora today. By the way, I learned some basic operations on vi and Vim in Linux. Although it is simple, I still have to practice it. Do you mean that?

It is true that even simple things may go wrong, and reading commands from books may go wrong. Believe it or not? I want to compile a Makefile file

Compile my hello. c file. The file is very simple and the content is as follows:

Hello: hello. c
Gcc hello. c-o hello

Make reports an error. makefile: 2: *** missing separator. Stop. It is really strange that the second line is a command, and the above command is executed independently!

I have little experience in C Programming in Linux. Baidu immediately got it and the result came out. If you have any questions, you will know it!

The reason is the command of the second line, that is, gcc hello. c-o hello must be preceded by a Tab, that is, the Return key. Otherwise, the miss separator will be reported. Do you think this rule is boring?

Edit it again, delete the leading space, type a Tab, and make again. It is successful!

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.