提示:文章
文章目录
前言
前期疑问:
本文目标:
一、背景
最近
二、使用autotool生成makefile
4.0 程序文件
建立目录:mkdir include src
编写程序:include/str.h
#include <stdio.h>
int str(char *string);
编写程序:src/str.c
#src/str.c
#include "str.h"
//print string
int str(char *string){
printf("\n----PRINT STRING----\n\"%s\"\n",string);
return 0;
}
//interface of this program
int main(int argc , char **argv){
char str_read[1024];
printf("Please INPUT something end by [ENTER]\n");
scanf("%s",str_read);
return str(str_read );
}
4.1执行autoscan
[root@localhost str]# ls
include src
[root@localhost str]# autoscan
静默执行
4.1.1报错
root@0002:~/gdal_0407/MakefileTest# autoscan
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/${ <-- HERE [^}]*}/ at /usr/bin/autoscan line 361.
解决办法:
执行autoscan后生成文档
-rw-r--r-- 1 root root 0 Apr 8 15:11 autoscan.log
-rw-r--r-- 1 root root 469 Apr 8 15:11 configure.scan
drwxr-xr-x 2 root root 4096 Apr 8 15:00 include/
drwxr-xr-x 2 root root 4096 Apr 8 15: