GCC/G++;错误Mac OS X Yosemite

GCC/G++;错误Mac OS X Yosemite,gcc,clang,osx-yosemite,Gcc,Clang,Osx Yosemite,几个星期以来,我一直在使用一款新的Mac电脑,它与OS X Yosemite(10.10.3版)一起工作。我发现从源代码安装程序有很多问题,为什么我已经将编译器改为GCC4.2、4.7和4.9。此外,我“删除”了与clang的连接,但这也会在编译过程中产生错误。但是,在MacOSX机器版本10.7.5上执行同样的操作也可以。在那里,gcc版本4.2.1正在运行 下面是一条示例错误消息,我在命令行中键入make: cc -O2 -c -o swat.o swat.c In file inclu

几个星期以来,我一直在使用一款新的Mac电脑,它与OS X Yosemite(10.10.3版)一起工作。我发现从源代码安装程序有很多问题,为什么我已经将编译器改为GCC4.2、4.7和4.9。此外,我“删除”了与clang的连接,但这也会在编译过程中产生错误。但是,在MacOSX机器版本10.7.5上执行同样的操作也可以。在那里,gcc版本4.2.1正在运行

下面是一条示例错误消息,我在命令行中键入make:

cc -O2   -c -o swat.o swat.c
In file included from swat.c:25:
./swat.h:85:35: warning: '/*' within block comment [-Wcomment]
  /*  int *maxstu_vec; NOT NEEDED /* array of length length + 1, used to hold row of scores,
                                  ^
swat.c:29:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
compare_scores(entry1, entry2)
^
swat.c:35:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
compare_z_scores(entry1, entry2)
^
swat.c:42:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
compare_E_values(entry1, entry2)
^
swat.c:49:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
main(argc,argv)
^
swat.c:75:3: warning: implicit declaration of function 'get_parameters' is invalid in C99 [-Wimplicit-function-declaration]
  get_parameters(argc, argv, "swat"); 
  ^
swat.c:85:3: warning: implicit declaration of function 'alloc_hist' is invalid in C99 [-Wimplicit-function-declaration]
  alloc_hist();
  ^
swat.c:86:10: warning: implicit declaration of function 'get_next_file_entry' is invalid in C99 [-Wimplicit-function-declaration]
  while (get_next_file_entry(qdb)) {
         ^
swat.c:95:5: warning: implicit declaration of function 'notify' is invalid in C99 [-Wimplicit-function-declaration]
    notify("Searching: ");
    ^
swat.c:98:12: warning: implicit declaration of function 'append_seq_entry' is invalid in C99 [-Wimplicit-function-declaration]
        s_entry = append_seq_entry(sdb);
                  ^
swat.c:110:2: warning: implicit declaration of function 'set_score' is invalid in C99 [-Wimplicit-function-declaration]
        set_score(s_entry, score);
        ^
swat.c:127:57: warning: implicit declaration of function 'get_seq_length' is invalid in C99 [-Wimplicit-function-declaration]
        score = parameters->align(q_profile, get_seq(s_entry), get_seq_length(s_entry), 1, 0, 0, 0, 0, 0);
                                                               ^
swat.c:146:5: warning: implicit declaration of function 'initialize_hist' is invalid in C99 [-Wimplicit-function-declaration]
    initialize_hist(); 
    ^
swat.c:155:7: warning: implicit declaration of function 'update_hist' is invalid in C99 [-Wimplicit-function-declaration]
      update_hist(score_entry, 0);
      ^
swat.c:158:5: warning: implicit declaration of function 'process_hist' is invalid in C99 [-Wimplicit-function-declaration]
    process_hist();
    ^
swat.c:172:2: warning: implicit declaration of function 'fit_log_n' is invalid in C99 [-Wimplicit-function-declaration]
        fit_log_n(q_length);
        ^
swat.c:175:4: warning: implicit declaration of function 'find_z' is invalid in C99 [-Wimplicit-function-declaration]
          find_z(score_entry);
          ^
swat.c:195:9: warning: implicit declaration of function 'reject_entry' is invalid in C99 [-Wimplicit-function-declaration]
          if (!reject_entry(score_entry)) nz++; /* assumes Smith-Waterman */
               ^
swat.c:202:7: warning: implicit declaration of function 'new_est_lambda_K' is invalid in C99 [-Wimplicit-function-declaration]
      new_est_lambda_K(q_length, score_entries, last_score_entry);
      ^
swat.c:242:24: warning: '&&' within '||' [-Wlogical-op-parentheses]
        if (parameters->use_n && score_entry >= score_entries + parameters->max_num_alignments
            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
swat.c:242:24: note: place parentheses around the '&&' expression to silence this warning
        if (parameters->use_n && score_entry >= score_entries + parameters->max_num_alignments
                              ^
            (                                                                                 )
swat.c:243:24: warning: '&&' within '||' [-Wlogical-op-parentheses]
         || parameters->use_z && score_entry->z < parameters->z_cutoff || !score_entry->score) 
         ~~ ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
swat.c:243:24: note: place parentheses around the '&&' expression to silence this warning
         || parameters->use_z && score_entry->z < parameters->z_cutoff || !score_entry->score) 
                              ^
            (                                                         )
swat.c:256:29: warning: data argument not used by format string [-Wformat-extra-args]
               score_entry->score, score_entry->z, e_value, score_entry->E);
                                   ^
swat.c:261:2: warning: implicit declaration of function 'print_alignment' is invalid in C99 [-Wimplicit-function-declaration]
        print_alignment(q_profile);
        ^
swat.c:266:65: warning: data argument not used by format string [-Wformat-extra-args]
                get_id(seq_num), get_seq_length(seq_num), score_entry->score, score_entry->z);
                                                                              ^
swat.c:272:5: warning: implicit declaration of function 'free_profile' is invalid in C99 [-Wimplicit-function-declaration]
    free_profile(q_profile);
    ^
25 warnings generated.
cc -O2   -c -o weibull.o weibull.c
In file included from weibull.c:25:
./swat.h:85:35: warning: '/*' within block comment [-Wcomment]
  /*  int *maxstu_vec; NOT NEEDED /* array of length length + 1, used to hold row of scores,
                                  ^
weibull.c:47:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
reject_entry(score_entry)
^
weibull.c:50:32: warning: '&&' within '||' [-Wlogical-op-parentheses]
  return (!parameters->nw_flag && !score_entry->score || score_entry->length < LENGTH_CUTOFF);
          ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ ~~
weibull.c:50:32: note: place parentheses around the '&&' expression to silence this warning
  return (!parameters->nw_flag && !score_entry->score || score_entry->length < LENGTH_CUTOFF);
                               ^
          (                                          )
weibull.c:53:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
alloc_hist()
^
weibull.c:65:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
weibull.c:67:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
initialize_hist()
^
weibull.c:78:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
weibull.c:80:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
update_hist(score_entry, z_flag)
^
weibull.c:88:5: error: non-void function 'update_hist' should return a value [-Wreturn-type]
    return;
    ^
weibull.c:92:5: error: non-void function 'update_hist' should return a value [-Wreturn-type]
    return;
    ^
weibull.c:106:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
prune_hist(score_entry)
^
weibull.c:111:34: error: non-void function 'prune_hist' should return a value [-Wreturn-type]
  if (reject_entry(score_entry)) return;
                                 ^
weibull.c:127:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
process_hist()
^
weibull.c:155:5: warning: implicit declaration of function 'fatalError' is invalid in C99 [-Wimplicit-function-declaration]
    fatalError("No entries have scores exceeding -gap_init");
    ^
weibull.c:168:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
fit_log_n(q_length)
^
weibull.c:300:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
est_lambda_K(q_length) 
^
weibull.c:399:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
new_est_lambda_K(q_length, score_entries, last_score_entry) /* using non-extreme-value dist'n */
^
weibull.c:644:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
find_z(entry)
^
weibull.c:652:21: warning: implicit declaration of function 'make_log_table' is invalid in C99 [-Wimplicit-function-declaration]
    if (!log_table) make_log_table();
                    ^
weibull.c:665:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
make_log_table()
^
17 warnings and 3 errors generated.
make: *** [weibull.o] Error 1
cc-O2-c-o swat.o swat.c
在swat.c:25中包含的文件中:
./swat.h:85:35:警告:“/*”在块注释内[-Wcomment]
/*int*maxstu_vec;不需要/*长度+1的数组,用于保存分数行,
^
swat.c:29:1:警告:缺少类型说明符,默认为“int”[-Wimplicit int]
比较大学分数(第1项、第2项)
^
swat.c:35:1:警告:缺少类型说明符,默认为“int”[-Wimplicit int]
比较_z_分数(entry1,entry2)
^
swat.c:42:1:警告:缺少类型说明符,默认为“int”[-Wimplicit int]
比较项目值(项目1、项目2)
^
swat.c:49:1:警告:缺少类型说明符,默认为“int”[-Wimplicit int]
主(argc、argv)
^
swat.c:75:3:警告:C99[-Wimplicit函数声明]中函数“get_parameters”的隐式声明无效
获取_参数(argc、argv、swat);
^
swat.c:85:3:警告:函数“alloc_hist”的隐式声明在C99[-Wimplicit函数声明]中无效
alloc_hist();
^
swat.c:86:10:警告:C99[-Wimplicit函数声明]中函数“get_next_file_entry”的隐式声明无效
while(获取下一个文件条目(qdb)){
^
swat.c:95:5:警告:C99[-Wimplicit函数声明]中函数“notify”的隐式声明无效
通知(搜索:);
^
swat.c:98:12:警告:C99[-Wimplicit函数声明]中函数“append\u seq\u entry”的隐式声明无效
s_条目=追加顺序条目(sdb);
^
swat.c:110:2:警告:函数“set_score”的隐式声明在C99[-Wimplicit函数声明]中无效
设置分数(s\U条目,分数);
^
swat.c:127:57:警告:C99[-Wimplicit函数声明]中函数“get_seq_length”的隐式声明无效
分数=参数->对齐(q_配置文件、get_seq(s_条目)、get_seq_长度(s_条目)、1、0、0、0、0);
^
swat.c:146:5:警告:函数“initialize_hist”的隐式声明在C99[-Wimplicit函数声明]中无效
初始化_hist();
^
swat.c:155:7:警告:函数“update_hist”的隐式声明在C99[-Wimplicit函数声明]中无效
更新历史记录(分数记录,0);
^
swat.c:158:5:警告:函数“process_hist”的隐式声明在C99[-Wimplicit函数声明]中无效
进程历史();
^
swat.c:172:2:警告:函数“fit_log_n”的隐式声明在C99[-Wimplicit函数声明]中无效
拟合对数n(q_长度);
^
swat.c:175:4:警告:函数“find_z”的隐式声明在C99[-Wimplicit函数声明]中无效
查找z(分数输入);
^
swat.c:195:9:警告:C99[-Wimplicit函数声明]中函数“reject_entry”的隐式声明无效
如果(!拒绝输入(分数输入))nz++;/*假设史密斯·沃特曼*/
^
swat.c:202:7:警告:函数“new_est_lambda_K”的隐式声明在C99[-Wimplicit函数声明]中无效
新的最新lambda_K(q_长度、分数项、最后分数项);
^
swat.c:242:24:警告:“&&”在“||”内[-WLlogical op括号]
如果(参数->使用分数和分数项>=分数项+参数->最大数量对齐
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
swat.c:242:24:注意:在“&&”表达式周围加上括号以使此警告静音
如果(参数->使用分数和分数项>=分数项+参数->最大数量对齐
^
(                                                                                 )
swat.c:243:24:警告:“&&”在“| |”内[-Wlogical操作括号]
||参数->使用评分输入->评分<参数->评分截止点| |!评分输入->评分)
~~ ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
swat.c:243:24:注意:在“&&”表达式周围加上括号以使此警告静音
||参数->使用评分输入->评分<参数->评分截止点| |!评分输入->评分)
^
(                                                         )
swat.c:256:29:警告:格式字符串[-Wformat extra args]未使用数据参数
分数输入->分数,分数输入->z,e值,分数输入->e);
^
swat.c:261:2:警告:函数“print_alignment”的隐式声明在C99[-Wimplicit函数声明]中无效
打印对齐(q_配置文件);
^
swat.c:266:65:警告:格式字符串[-Wformat extra args]未使用数据参数
获取id(seq_num),获取长度(seq_num),分数输入->分数,分数输入->z;
^
swat.c:272:5:警告:C99[-Wimplicit函数声明]中函数“free_profile”的隐式声明无效
自由曲线(q曲线);
^
生成了25个警告。
cc-O2-c-o威布尔.o威布尔.c
在weibull.c:25中包含的文件中:
./swat.h:85:35:警告:“/*”在块注释内[-Wcomment]
/*int*maxstu_vec;不需要/*长度为+1的数组,用于保存分数行,
^
weibull.c:47:1:警告:缺少类型说明符,默认值为t
weibull.c:88:5: error: non-void function 'update_hist' should return a value [-Wreturn-type]
    return;
    ^
weibull.c:92:5: error: non-void function 'update_hist' should return a value [-Wreturn-type]
    return;
    ^
weibull.c:111:34: error: non-void function 'prune_hist' should return a value [-Wreturn-type]
  if (reject_entry(score_entry)) return;
                                 ^