|
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下程序已经通过运行,请问问题在那里?对编程很不熟悉的说... |
|