首页 > 解决方案 > 如何成功编译此文件?

问题描述

我正在尝试从 NPB 编译 bt。我收到附加的错误Compilation Error。我还附上了我正在使用的make文件。

在这种情况下我做错了什么?

生成文件:

SHELL=/bin/sh
BENCHMARK=bt
BENCHMARKU=BT

include ../config/make.def


OBJS =  bt.o \
    ${COMMON}/c_print_results.o ${COMMON}/c_timers.o ${COMMON}/c_wtime.o

include ../sys/make.common

# npbparams.h is included by header.h
# The following rule should do the trick but many make programs (not gmake)
# will do the wrong thing and rebuild the world every time (because the
# mod time on header.h is not changed. One solution would be to 
# touch header.h but this might cause confusion if someone has
# accidentally deleted it. Instead, make the dependency on npbparams.h
# explicit in all the lines below (even though dependence is indirect). 

# header.h: npbparams.h

${PROGRAM}: config ${OBJS}
    ${CLINK} ${CLINKFLAGS} -o ${PROGRAM} ${OBJS} ${C_LIB}

.c.o:
    ${CCOMPILE} $<


bt.o:             bt.c  header.h npbparams.h

clean:
    - rm -f *.o *~ mputil*
    - rm -f npbparams.h core

标签: llvm

解决方案


似乎不见了../sys/setparams

这应该是一个可执行文件,并bt A作为输入参数。

它可能是一个依赖的工具,应该首先构建。我已经尝试在 github 上搜索,并且可以找到一些包含../sys/setparams.c,,也许,这些是你需要的项目。

希望它可以帮助你。


推荐阅读