From: Jonathan W. <jon...@gm...> - 2007-09-06 09:04:46
|
The compiler seems to have found timeGetTime in the header file, so compilation works after that, though, the Linker cannot find the code of that function. You need to tell Dev-Cpp to link againt the library you are using (mmsystem I imagine) Jonathan On 9/6/07, kve...@bk... <kve...@bk...> wrote: > > Hello, Dev-cpp-users. > > > #include <cstdlib> > #include <iostream> > > #include <windows.h> > #include <mmsystem.h> > > > using namespace std; > > int main(int argc, char *argv[]) > { > DWORD mytime; > > mytime = timeGetTime(); > > system("PAUSE"); > return EXIT_SUCCESS; > } > > I have a problem: > > [Linker error] undefined reference to `timeGetTime@0' > ld returned 1 exit status > D:\Dev-Cpp\my projects\37\Makefile.win [Build Error] [progr.exe] Error 1 > > what's wrong in my code? > > -- > best regards, mailto:kve...@bk... > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > -- <Morpheus> linux, c'est une question de VI ou de MORE |