Click to See Complete Forum and Search --> : AVIFile linker error


slapy
June 19th, 2006, 04:35 PM
Hello,
I was wondering if anybody could help me out with an error I always get:
Trying to build the simple project below I always get "[Linker error] undefined reference to `AVIFileInit@0'"
I am Using Dev-C++ and added the libraries vfw32.lib and winmm.lib.

code:
#include <windows.h>
#include <iostream>
#include "vfw.h"

int main(int argc, char *argv[]){
AVIFileInit();
system("PAUSE");
return EXIT_SUCCESS;
}

I would really appreciate if someone could give me a short hint,
best regards,
slapy

golanshahar
June 20th, 2006, 02:02 AM
You should the Vfw32.lib to the linker.

Cheers

slapy
June 20th, 2006, 12:56 PM
yes, but that's what I did...it's not working

golanshahar
June 20th, 2006, 01:08 PM
Can you post the whole project here? (Without the temporary files and debug/release directories)

Cheers

humptydumpty
June 21st, 2006, 12:22 AM
it Should work Include
Vfw32.lib
and use
#include<vfw.h> Now Clean your build delete your Debug and ove again run your Project.
hope this Will Work Now.

Thanx

kkez
June 22nd, 2006, 08:15 AM
If you're using Dev-cpp that means you're using MinGW, and mingw doesn't uses .lib files but .a files, so you should link to libwinmm.a and lib vfw32.a.