At the bottom of the documentation page for timeSetEvent is:
Code:
Library: Use Winmm.lib.
This means that you have to link with Winmm.lib to use that function. Add a library to the link using gcc's -l option:
Code:
gcc -o output -mwindows stuff.o mainfile.c -lwinmm
To use the VC compiler with Windows functions, you will need to download the Platform SDK.
You can then compile your code with a batch file like this:
Code:
:: This is for VC Toolkit 2003.
call "C:\Program Files\Microsoft Visual C++ Toolkit 2003\vcvars32"
:: Set environment variables for Platform SDK:
SET INCLUDE=%INCLUDE%;C:\Program Files\Microsoft SDK\Include;
SET LIB=%LIB%;C:\Program Files\Microsoft SDK\Lib;
%0\
cd %0\..
cd /d %0\..
cls
cl /GF /W3 %1 KERNEL32.LIB USER32.LIB
@del *.obj
@echo.
@pause
This batch file will compile a file dragged onto it. Alternatively, you can replace %1 with the name of one or more files you wish to compile. A list of cl options is available here.