From: meenal on 1 Dec 2008 01:31 Hi all , I am using the fillowing function to build the glut.dll .. int gettimeofday(struct timeval* tp, void* tzp) { struct timeb tb; ftime(&tb); tp->tv_sec = tb.time; tp->tv_usec = tb.millitm * 1000; /* 0 indicates that the call succeeded. */ return 0; } when i build the workspace i get the fillowing error >win32_util.obj : error LNK2019: unresolved external symbol __imp___ftime64@4 referenced in function _ftime@4 1>Debug/GLUT32.DLL : fatal error LNK1120: 1 unresolved externals Can you please help me to remove the errors. regards, Meenal
From: KoushalVV on 1 Dec 2008 02:59 have u included time.h or the related header file in u r cpp file? "meenal" wrote: > Hi all , > I am using the fillowing function to build the glut.dll .. > > > int gettimeofday(struct timeval* tp, void* tzp) > { > struct timeb tb; > > ftime(&tb); > tp->tv_sec = tb.time; > tp->tv_usec = tb.millitm * 1000; > > /* 0 indicates that the call succeeded. */ > return 0; > } > > when i build the workspace i get the fillowing error > >win32_util.obj : error LNK2019: unresolved external symbol __imp___ftime64@4 referenced in function _ftime@4 > 1>Debug/GLUT32.DLL : fatal error LNK1120: 1 unresolved externals > > Can you please help me to remove the errors. > > regards, > Meenal >
From: meenal on 1 Dec 2008 03:34 yes i have included "sys/timeb.h" regards, meenal
From: Giovanni Dicanio on 1 Dec 2008 05:31 Hi, I downloaded GLUT Win32 port from his author's page: http://www.xmission.com/~nate/glut.html The actual link to source code is this: http://www.xmission.com/~nate/glut/glut-3.7.6-src.zip This library seems to me written using VC6 (it's a pure C library). I tried building it with my copy of VC6 with SP6 and it built fine (no error occurred). Note that the function that gives you error has a different definition in the source code I downloaded from the aforementioned link. In fact, in file "win32_util.c" the body of the gettimeofday function is this: <code> int gettimeofday(struct timeval* tp, void* tzp) { LARGE_INTEGER t; if(QueryPerformanceCounter(&t)) { /* hardware supports a performance counter */ LARGE_INTEGER f; QueryPerformanceFrequency(&f); tp->tv_sec = t.QuadPart/f.QuadPart; tp->tv_usec = ((float)t.QuadPart/f.QuadPart*1000*1000) - (tp->tv_sec*1000*1000); } else { /* hardware doesn't support a performance counter, so get the time in a more traditional way. */ DWORD t; t = timeGetTime(); tp->tv_sec = t / 1000; tp->tv_usec = t % 1000; } /* 0 indicates that the call succeeded. */ return 0; } </code> and it compiles fine, as the whole GLUT library. Are you sure that you downloaded the Win32 port of GLUT? (And not some Unix/Linux version ?) Giovanni "meenal" <meenaldgupta(a)gmail.com> ha scritto nel messaggio news:ac2a898e-c058-4a91-916a-419904918267(a)o40g2000prn.googlegroups.com... > Hi all , > I am using the fillowing function to build the glut.dll .. > > > int gettimeofday(struct timeval* tp, void* tzp) > { > struct timeb tb; > > ftime(&tb); > tp->tv_sec = tb.time; > tp->tv_usec = tb.millitm * 1000; > > /* 0 indicates that the call succeeded. */ > return 0; > } > > when i build the workspace i get the fillowing error >>win32_util.obj : error LNK2019: unresolved external symbol >>__imp___ftime64@4 referenced in function _ftime@4 > 1>Debug/GLUT32.DLL : fatal error LNK1120: 1 unresolved externals > > Can you please help me to remove the errors. > > regards, > Meenal
|
Pages: 1 Prev: error LNK2001: unresolved external symbol Next: vc6 and HtmlHelp / SetHelpMode(afxHTMLHelp) |