LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 747|回复: 0

帮忙看看makefile有什么问题?

[复制链接]
发表于 2006-12-20 23:52:48 | 显示全部楼层 |阅读模式
main.cpp中include了test.h parameters.h fileio.h beam.h response.h
test.cpp 中include了test.h beam.h
fileio.cpp中include了fileio.h
beam.cpp中include了beam.h
makefile如下:
objects = mani.o test.o fileio.o beam.o response.o
CC = mpiCC -I/opt/intel/mkl60/include -L/opt/intel/mkl60/lib/32
FLAGS = -O3 -lm
RUNresponse(objects)
        $(CC) $(FLAGS) RUNresponse $(objects)
mani.o:main.cpp test.h parameters.h fileio.h beam.h response.h
        $(CC) $(FLAGS) main.cpp
test.o:test.cpp test.h beam.h
        $(CC) $(FLAGS) test.cpp
fileio.o:fileio.cpp fileio.h
        $(CC) $(FLAGS) fileio.cpp
beam.o:beam.cpp beam.h
        $(CC) $(FLAGS) beam.cpp
response.o:response.cpp response.h
        $(CC) $(FLAGS) response.cpp

.PHONY:clean
clean:
        -rm RUNresponse $(objects)

当make了之后出现如下错误:
mpiCC -I/opt/intel/mkl60/include -L/opt/intel/mkl60/lib/32 -O3 -lm main.cpp
cc1plus: warning: changing search order for system directory "/usr/local/include"
cc1plus: warning:   as it has already been specified as a non-system directory
main.cpp: In function `int main()':
main.cpp:102: `argc' undeclared (first use this function)
main.cpp:102: (Each undeclared identifier is reported only once for each
   function it appears in.)
main.cpp:102: `argv' undeclared (first use this function)
make: *** [mani.o] Error 1

ps:以上是在集群上编译的结果,在windows下程序已经通过运行,请问问题在那里?对编程很不熟悉的说...
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表