[UDT] cc.h:683: error: =?windows-1252?Q?=91=5F=5Fint64=92_does_not?= =?windows-1252?Q?_name_a_type?
Brought to you by:
lilyco
From: Franz P. <f....@fz...> - 2006-05-29 09:16:59
|
Hi, I just downloaded the udt3-sources, and I am getting the following=20 errors when compiling (fyi: udtperf is a self-written tool we use for=20 udt-testing and includes "cc.h"): make -C app all make[1]: Entering directory `/home/xxx/programme/udt3_mod/app' g++ -Wall -DLINUX -I../src -O2 -finline-functions -DIA32 udtperf.cpp -c ../src/ccc.h:195: warning: =91class CCCVirtualFactory=92 has virtual=20 functions but non-virtual destructor cc.h:683: error: =91__int64=92 does not name a type cc.h: In member function =91virtual void CGTP::init()=92: cc.h:603: error: =91m_llLastRecvPkt=92 was not declared in this scope cc.h: In member function =91virtual void CGTP::onPktReceived()=92: cc.h:629: error: =91m_llLastRecvPkt=92 was not declared in this scope As a very quick and dirty workaround I made the following change in cc.h=20 from __int64 to long long int which solves the above errors: *** udt3/app/cc.h 2006-03-13 17:53:25.000000000 +0100 --- udt3_mod/app/cc.h 2006-05-29 11:07:27.000000000 +0200 *************** *** 680,686 **** double m_dRequestRate; timeval m_LastGCTime; ! __int64 m_llLastRecvPkt; int m_iLastRcvLoss; int m_iRTT; --- 680,686 ---- double m_dRequestRate; timeval m_LastGCTime; ! long long int m_llLastRecvPkt; int m_iLastRcvLoss; int m_iRTT; Now compilation works, but I get the following error when linking (I=20 don't know wether it is related to the above error): make -C app all make[1]: Entering directory `/home/xxx/programme/udt3_mod/app' g++ udtperf.o -o udtperf -L../src -ludt -lstdc++ -lpthread -lm -ldl udtperf.o: In function `CGTP::onPktReceived()': udtperf.cpp:(.gnu.linkonce.t._ZN4CGTP13onPktReceivedEv[CGTP::onPktReceive= d()]+0x17a):=20 undefined reference to `CGTP::m_iGTPPktType' collect2: ld returned 1 exit status make[1]: *** [udtperf] Error 1 make[1]: Leaving directory `/home/xxx/programme/udt3_mod/app' make: *** [app.all] Error 2 In our udtperf.cpp the CCCFactory<CGTP> class is instantiated like this=20 (which works well for all other CCCFactory objects): UDT::setsockopt(client,0,UDT_CC,new=20 CCCFactory<CGTP>,sizeof(CCCFactory<CGTP>));} Another quick and dirty workaround solves the linking error: *** udt3/app/cc.h 2006-03-13 17:53:25.000000000 +0100 --- udt3_mod/app/cc.h 2006-05-29 11:07:27.000000000 +0200 *************** *** 668,674 **** void requestRate(int mbps) { CPacket pkt; ! pkt.pack(0x111, const_cast<void*>((void*)&m_iGTPPktType), &mbps,=20 sizeof(int)); sendCustomMsg(pkt); } --- 668,674 ---- void requestRate(int mbps) { CPacket pkt; ! pkt.pack(0x111, const_cast<void*>((void*)m_iGTPPktType), &mbps,=20 sizeof(int)); sendCustomMsg(pkt); } I compile on a dual-core Pentium4, Suse 10.0, Kernel version=20 2.6.16.7-smp (vanilla), gcc version 4.0.2, glibc version 2.3.5 Please apologize for any clumsy code style as I am a C++-novice. Any=20 suggestions for a cleaner/more elegant solution are appreciated. Thank you very much, Franz Petri. |