CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2006
    Posts
    2

    AVIFile linker error

    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

  2. #2
    Join Date
    May 2005
    Posts
    4,954

    Re: AVIFile linker error

    You should the Vfw32.lib to the linker.

    Cheers
    If a post helped you dont forget to "Rate This Post"

    My Article: Capturing Windows Regardless of Their Z-Order

    Cheers

  3. #3
    Join Date
    Jun 2006
    Posts
    2

    Re: AVIFile linker error

    yes, but that's what I did...it's not working

  4. #4
    Join Date
    May 2005
    Posts
    4,954

    Re: AVIFile linker error

    Can you post the whole project here? (Without the temporary files and debug/release directories)

    Cheers
    If a post helped you dont forget to "Rate This Post"

    My Article: Capturing Windows Regardless of Their Z-Order

    Cheers

  5. #5
    Join Date
    May 2005
    Location
    Oregon
    Posts
    3,725

    Re: AVIFile linker error

    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

  6. #6
    Join Date
    Sep 2004
    Location
    Italy
    Posts
    389

    Re: AVIFile linker error

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured