Linux programming common problems Daquan

  
 

Error: Makefile: 2: *** Missing separator. stop. The reason is missing a tab separator before the gcc statement in the makefile

Error: bash: ./makefile: The permission is insufficient. The makefile is a text file that cannot be executed. Even if it is root, the permissions are not enough. We should be under the command line. With make, the command will automatically search for the makefile in the directory. If you use other names such as (makefile.am), you should add parameters, such as: make -f makefile.am

Error: ac: 6: Error: There is a free ‘\\200’ac:6: error in the program: There is a free ‘\\200’ac:8: error in the program: There is a free ‘\\343’ac:8 in the program: Error: There is a free ‘\\200’ac:8 in the program: Error: There is a free ‘\\200’

reason in the program. This error is generally due to the use of Chinese in your program (ac). Punctuation marks such as ;,},+. It will be fine to change to English. Sometimes even a similar error occurs in the space, delete the space and re-enter. If you can't find it, the solution is to close the Chinese input method and knock the wrong line again.

Error: 0 warning: Implicit declarations and built-in functions ‘printf’ not compatible 1 Warning: Implicit declarations and built-in functions ‘malloc’ Incompatible 2Warning: Implicit declarations and built-in Function ‘exit’ Incompatible 3 Warning: Implicitly declared with built-in functions ‘execlp’ Incompatible 4Warning: Implicit declarations and built-in functions ‘strlen’ Incompatible 5 Error: ‘FILE’ Undeclared (//Use fopen)

Workaround: Add the header file 0#include "stdio.h"1#include <malloc.h>2#include <stdlib.h>3#include <unistd. h>4#include <string.h> 5#include <stdio.h>

The C type string is followed by a '\\0' as the trailing identifier implicitly. Sizeof(a) includes '\\0' and strlen(a) does not count '\\0'.

Error: ‘O_RDONLY’ Undeclared source fd = open("test.file", O_RDONLY); Resolved: #include <fcntl.h>int open(const char *pathname, int oflag, ... /* mode_t mode */); syntax reference: http://baike.baidu.com/view/26337.htm differs from: #include<stdio.h> FILE * fopen(const char * path, const char * mode); Syntax Reference: http://baike.baidu.com/view/656681.htm

Error: ‘CLONE_VM’ Undeclared error: ‘CLONE_FILES’ Undeclared Source: clone when using clone (do_something, child_stack, CLONE_VM

Copyright © Windows knowledge All Rights Reserved