首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 服务器 > 其他服务器 >

写了一个Makefile,make时老报错,大家帮解决下啊该怎么解决

2012-02-14 
写了一个Makefile,make时老报错,大家帮解决下啊,急~~################################### NEW MAKEFILE##

写了一个Makefile,make时老报错,大家帮解决下啊,急~~
#################################
#
# NEW MAKEFILE
#
#################################
PINDIR=/opt/ttadmin/TimesTen/tt1121
INCDIR=$(PINDIR)/include
LIBDIR=$(PINDIR)/lib
TINCDIR=$(INCDIR)/ttclasses
################################
INCFILES= $(INCDIR)/sql.h $(INCDIR)/sqlext.h $(INCDIR)/sqltypes.h $(INCDIR)/sqlunix.h\
$(INCDIR)/timesten.h $(INCDIR)/tt_errCode.h $(INCDIR)/tt_xa.h $(INCDIR)/tt_xla.h\
$(INCDIR)/ttutil.h $(INCDIR)/ttutillib.h $(INCDIR)/xa.h $(TINCDIR)/TTInclude.h\
$(TINCDIR)/TTConnection.h $(TINCDIR)/TT__Header.h
OBJECTS= basics.o bulkcp.o bulktest.o catalog.o\
plsqlTTCLASSES.o pooltest.o portable_thread_unix.o\
testprog_utils.o ttSizeAll.o typetest.o

ttclasses_test:$(OBJECTS)
CC -o $(OBJECTS)
basics.o:basics.cpp $(INCFILES)
CC -c basics.cpp
bulkcp.o:bulkcp.cpp $(INCFILES)
CC -c bulkcp.cpp
bulktest.o:bulktest.cpp $(INCFILES)
CC -c bulktest.cpp
catalog.o:catalog.cpp $(INCFILES)
CC -c catalog.cpp
plsqlTTCLASSES.o:plsqlTTCLASSES.cpp $(INCFILES)
CC -c plsqlTTCLASSES.cpp
pooltest.o:pooltest.cpp $(INCFILES)
CC -c pooltest.cpp
portable_thread_unix.o:portable_thread_unix.c $(INCFILES)
cc -c portable_thread_unix.c
testprog_utils.o:testprog_utils.cpp $(INCFILES)
CC -c testprog_utils.cpp
ttSizeAll.o:ttSizeAll.cpp $(INCFILES)
CC -c ttSizeAll.cpp
typetest.o:typetest.cpp $(INCFILES)
CC -c typetest.cpp
clean:
rm ttclasses_test:$(OBJECTS)
############
报的错误为:
$ make
CC -c basics.cpp
"basics.cpp", line 32: Error: Could not open include file<ttclasses/TTInclude.h>.
"testprog_utils.h", line 19: Error: Could not open include file<sqlunix.h>.
"testprog_utils.h", line 26: Error: Could not open include file<sql.h>.
"testprog_utils.h", line 27: Error: Could not open include file<sqlext.h>.
"basics.cpp", line 34: Error: Could not open include file "tt_version.h".
"basics.cpp", line 38: Error: TTConnection is not defined.
"basics.cpp", line 40: Error: TTConnection is not defined.
"basics.cpp", line 40: Error: Connect is not defined.
"basics.cpp", line 43: Error: Type name expected instead of "TTCmd".
"basics.cpp", line 44: Error: Type name expected instead of "TTCmd".
"basics.cpp", line 45: Error: Type name expected instead of "TTCmd".
"basics.cpp", line 46: Error: Type name expected instead of "TTCmd".
"basics.cpp", line 53: Error: TTConnection is not defined.
"basics.cpp", line 53: Error: DRIVER_COMPLETION_ENUM is not defined.
"basics.cpp", line 75: Error: TTError is not defined.
"basics.cpp", line 76: Error: cerr is not defined.
"basics.cpp", line 76: Error: st is not defined.
"basics.cpp", line 76: Error: endl is not defined.
"basics.cpp", line 85: Error: int is not a structure type.
"basics.cpp", line 86: Error: int is not a structure type.
"basics.cpp", line 87: Error: int is not a structure type.
"basics.cpp", line 89: Error: TTConnection is not defined.
"basics.cpp", line 95: Error: SampleConnection::Connect(const char*, int) is not a static data member.
"basics.cpp", line 95: Error: There is no matching ")".
"basics.cpp", line 95: Error: TTConnection is not defined.
Compilation aborted, too many Error messages.
*** Error code 2
make: Fatal error: Command failed for target `basics.o'


[解决办法]
你的头文件指定的不对吧,参考一个标准的
------解决方案--------------------


CC -c -I$(PINDIR) -I$(INCDIR) -I$(LIBDIR) -I$(TINCDIR) basics.cpp

热点排行