This works like a charm:
#include<windows.h>
#include <vfw.h>
#include <stdio.h>
#include <stdlib.h>
#pragma comment(lib,"Vfw32")
void main()
{
printf("Hello\n");
AVIFileInit();
printf("World\n");
AVIFileExit();
}
Update
If you are using MinGW, use
dlltool[
^] ,note the details about STDCALL, to generate a new import library from the dll.
Regards
Espen Harlinn