当前位置: 技术问答>linux和unix
make时遇到的问题,实在不懂,高手帮我看一下吧!!谢谢了
来源: 互联网 发布时间:2015-10-07
本文导语: 我在make 的时候,其他错误我已一一解决,但最后遇到这么一个错误,非常郁闷,由于是第一次接触linux,实在不明白。 我的makefile文件(部分): PROCESSOR = -DMGCP_20 -D_REDHAT MGCP_HDRS = /usr/local/radv/mgcp2.0.14fix2/include MG...
我在make 的时候,其他错误我已一一解决,但最后遇到这么一个错误,非常郁闷,由于是第一次接触linux,实在不明白。
我的makefile文件(部分):
PROCESSOR = -DMGCP_20 -D_REDHAT
MGCP_HDRS = /usr/local/radv/mgcp2.0.14fix2/include
MGCP_LIBS = /usr/local/radv/mgcp2.0.14fix2/lib
H323_HDRS = /usr/local/radv/h323stack4.1.0.16/include
H323_LIBS = /usr/local/radv/h323stack4.1.0.16/lib
HCADRS = /home/yinlei/hca
HCASTRDRS = /home/yinlei/hca/struct
RADVHDRS = -I $(MGCP_HDRS) -I $(H323_HDRS) -I $(HCADRS) -I $(HCASTRDRS) -I /home/yinlei/hca/h323
LIBLINK = -L $(MGCP_LIBS) -lmgcp -lsdp -lcore -lrtp -lpthread -lresolv -ltcl -lcurses -L $(H323_LIBS) -lh323 -lasn1 -lcommon -lh245 -lrv32rtp -L /usr/lib/mysql -lmysqlclient -lz
hca:main.o CCallAgent.o CStackHandler.o CRvStack.o CLogMgr.o CMysqlResult.o CMysqlDB.o IArea.o IGateWay.o IEndPoint.o ISession.o CArea.o CGateWay.o CEndPoint.o CFxsSession.o CTainetFxsEndPoint.o CFxsEndPointAC.o CFxoEndPointAC.o CFxoEndPoint.o CFxsEndPoint.o CCallHandler.o CSessionAudit.o CBillingMgr.o CRemoteStackHandler.o CH3232H323FwSession.o CRemoteArea.o CH323TimerMgr.o CH323EndPoint.o CH323GateWay.o CH323Area.o rasev.o CH323StackHandler.o CRemoteEndPoint.o
g++ main.o CCallAgent.o CStackHandler.o CRvStack.o CLogMgr.o CMysqlResult.o CMysqlDB.o IArea.o IGateWay.o IEndPoint.o ISession.o CArea.o CGateWay.o CEndPoint.o CFxsSession.o CTainetFxsEndPoint.o CFxsEndPointAC.o CFxoEndPointAC.o CFxoEndPoint.o CFxsEndPoint.o CCallHandler.o CSessionAudit.o CBillingMgr.o CRemoteStackHandler.o CH3232H323FwSession.o CRemoteArea.o CH323TimerMgr.o CH323EndPoint.o CH323GateWay.o CH323Area.o rasev.o CH323StackHandler.o CRemoteEndPoint.o $(RADVHDRS) $(PROCESSOR) $(LIBLINK) -o hca
main.o:main.cpp
g++ -c main.cpp $(RADVHDRS) $(PROCESSOR)
CCallAgent.o: CCallAgent.cpp CCallAgent.h
g++ -c CCallAgent.cpp $(RADVHDRS) $(PROCESSOR)
………………
clean:
rm *.o hca -f
我在make以后,提示:usr/bin/ld:skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld:cannot find -lmysqlclient
collect2:ld returned 1 exit status
make:***[hca] Error 1
在/usr/lib/mysql中,libmysqlclient.a是有的,我不知道文件中的 -L /usr/lib/mysql -lmysqlclient -lz 是什么意思。
高手们,指点一下吧!!!
我的makefile文件(部分):
PROCESSOR = -DMGCP_20 -D_REDHAT
MGCP_HDRS = /usr/local/radv/mgcp2.0.14fix2/include
MGCP_LIBS = /usr/local/radv/mgcp2.0.14fix2/lib
H323_HDRS = /usr/local/radv/h323stack4.1.0.16/include
H323_LIBS = /usr/local/radv/h323stack4.1.0.16/lib
HCADRS = /home/yinlei/hca
HCASTRDRS = /home/yinlei/hca/struct
RADVHDRS = -I $(MGCP_HDRS) -I $(H323_HDRS) -I $(HCADRS) -I $(HCASTRDRS) -I /home/yinlei/hca/h323
LIBLINK = -L $(MGCP_LIBS) -lmgcp -lsdp -lcore -lrtp -lpthread -lresolv -ltcl -lcurses -L $(H323_LIBS) -lh323 -lasn1 -lcommon -lh245 -lrv32rtp -L /usr/lib/mysql -lmysqlclient -lz
hca:main.o CCallAgent.o CStackHandler.o CRvStack.o CLogMgr.o CMysqlResult.o CMysqlDB.o IArea.o IGateWay.o IEndPoint.o ISession.o CArea.o CGateWay.o CEndPoint.o CFxsSession.o CTainetFxsEndPoint.o CFxsEndPointAC.o CFxoEndPointAC.o CFxoEndPoint.o CFxsEndPoint.o CCallHandler.o CSessionAudit.o CBillingMgr.o CRemoteStackHandler.o CH3232H323FwSession.o CRemoteArea.o CH323TimerMgr.o CH323EndPoint.o CH323GateWay.o CH323Area.o rasev.o CH323StackHandler.o CRemoteEndPoint.o
g++ main.o CCallAgent.o CStackHandler.o CRvStack.o CLogMgr.o CMysqlResult.o CMysqlDB.o IArea.o IGateWay.o IEndPoint.o ISession.o CArea.o CGateWay.o CEndPoint.o CFxsSession.o CTainetFxsEndPoint.o CFxsEndPointAC.o CFxoEndPointAC.o CFxoEndPoint.o CFxsEndPoint.o CCallHandler.o CSessionAudit.o CBillingMgr.o CRemoteStackHandler.o CH3232H323FwSession.o CRemoteArea.o CH323TimerMgr.o CH323EndPoint.o CH323GateWay.o CH323Area.o rasev.o CH323StackHandler.o CRemoteEndPoint.o $(RADVHDRS) $(PROCESSOR) $(LIBLINK) -o hca
main.o:main.cpp
g++ -c main.cpp $(RADVHDRS) $(PROCESSOR)
CCallAgent.o: CCallAgent.cpp CCallAgent.h
g++ -c CCallAgent.cpp $(RADVHDRS) $(PROCESSOR)
………………
clean:
rm *.o hca -f
我在make以后,提示:usr/bin/ld:skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld:cannot find -lmysqlclient
collect2:ld returned 1 exit status
make:***[hca] Error 1
在/usr/lib/mysql中,libmysqlclient.a是有的,我不知道文件中的 -L /usr/lib/mysql -lmysqlclient -lz 是什么意思。
高手们,指点一下吧!!!
|
你可能mysqlclient的包没有装吧
|
-L /usr/lib/mysql -lmysqlclient -lz
-L:后面跟库文件查找路径,
-L/usr/lib/mysql:表示到/usr/lib/mysql目录下找库文件,你可以更改这个目录;
-l:要连接的库文件,-lmysalclient:表示要连接的库的名字是:libmysqlclient.a;
-L:后面跟库文件查找路径,
-L/usr/lib/mysql:表示到/usr/lib/mysql目录下找库文件,你可以更改这个目录;
-l:要连接的库文件,-lmysalclient:表示要连接的库的名字是:libmysqlclient.a;