I am writing a code using multimedia timer, where i have to include the library winmm.h with out that it will not work. But i am not getting how to include this in my c project. is it possible to link to that library through c project please any one help me in this. i stuck up with this.
my code is here
Code:: #include<sys/time.h> #include<stdio.h> #include<time.h> #include<string.h> #include<windows.h> #include <mmsystem.h> void run() { static long int i= 0; i++; time_t t; time(&t); printf("S.No %ld Date and Time is: %s\n",i, ctime(&t)); } int main() { int timeinterval = 10; timeBeginPeriod(1); long cur = 0; long last = timeGetTime(); while(1) { cur = timeGetTime(); if ((cur - last) >= timeinterval) { run(); last = cur; _sleep(5); } } return 0; }