【发布时间】:2012-03-30 18:26:46
【问题描述】:
我是使用基准和 makefile 的新手。我已经从下面的链接下载了 Dhrystone 基准测试,我正在尝试编译它,但我遇到了奇怪的错误。我试图解决它,但我没有成功。有人可以帮我运行 dhrystone 基准测试吗? 以下是我尝试编译的两种不同方式。但是两者都给出了相同的错误结果:(
链接:http://fossies.org/unix/privat/old/dhrystone-2.1.tar.gz/
编译命令尝试:
gcc -g dhry.h dhry_1.c dhry_2.c -o dhrystonex
make all
错误:
gcc -O -DTIMES -DHZ=60 dhry_1.c dhry_2.c -o gcc_dry2
dhry_1.c:31:18: warning: conflicting types for built-in function ‘malloc’ [enabled by default]
dhry_1.c:48:17: error: conflicting types for ‘times’
/usr/include/i386-linux-gnu/sys/times.h:49:16: note: previous declaration of ‘times’ was here
dhry_1.c: In function ‘main’:
dhry_1.c:98:3: warning: incompatible implicit declaration of built-in function ‘strcpy’ [enabled by default]
dhry_1.c:124:11: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
make: *** [gcc_dry2] Error 1
【问题讨论】:
标签: c++ c linux performance unix