Hi C-Wizards ....
I have a very simple SetTimer program, and it does not work. The code is shown below:
#include <windows.h>
#include <stdio.h>
void CALLBACK RefreshLCDFnt (HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime);
int main (void)
{
UINT_PTR MyTimer;
MSG mymsg = {0, 0, 0, 0};
MyTimer = SetTimer (NULL, 0, 1000, (TIMERPROC)RefreshLCDFnt);
for (;;)
{
if (GetMessage (&mymsg, NULL, 0, 0)) DispatchMessage (&mymsg);
}
KillTimer (NULL, MyTimer);
return 0;
}
void CALLBACK RefreshLCDFnt (HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime)
{
printf ("+/-/*/");
}
Does anyone knows what I am missing?
I am getting these errors:
POLINK: error: Unresolved external symbol '__imp__SetTimer@16'.
POLINK: error: Unresolved external symbol '__imp__GetMessageA@16'.
POLINK: error: Unresolved external symbol '__imp__DispatchMessageA@4'.
POLINK: fatal error: 3 unresolved external(s).
What am I missing?
ps. When I use a different compiler, the code compiles correctly well, and it executes as designed.