Results 1 to 5 of 5

Thread: problem with vfw lib

  1. #1
    Join Date
    Nov 2009
    Posts
    39
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default problem with vfw lib

    Hi everyone,

    i've started programming (or trying it) a week ago with QT Creator 1.2.1 based on QT 4.5.3 32bit on a Windows SP3, i runed configure.exe on the qt command promt, i had no problems compiling examples or simple programs, but now i have to continue with someone elses work, and there begins my problem.

    The program uses an Aviutils h & cpp with some structs and functions,and this Aviutils.cpp has an #include <vfw.h> .

    Finally, when i try to build de project i recive this error



    Qt Code:
    1. ./release\AviUtils.o:AviUtils.cpp:(.text+0xd): undefined reference to `AVIFileInit@0'
    2. ./release\AviUtils.o:AviUtils.cpp:(.text+0x51): undefined reference to `AVIFileOpenW@16'
    3. ./release\AviUtils.o:AviUtils.cpp:(.text+0xe5): undefined reference to `AVIFileExit@0'
    4. ./release\AviUtils.o:AviUtils.cpp:(.text+0x14a): undefined reference to `AVIFileExit@0'
    5. .
    6. .
    7. .
    To copy to clipboard, switch view to plain text mode 

    I tried adding to de .pro file
    Qt Code:
    1. win32:LIBS += -L \
    2. C:\QT\2009.04\mingw\lib\libvfw32.a
    To copy to clipboard, switch view to plain text mode 

    I set on Tools->Options->CMake = C:\Qt\2009.04\mingw\bin\mingw32-g++.exe
    There are serveral .exe files inside that folder but i tried many of them with the same result.

    i've readed many problems that could have the same solution but... nothing worked...

    I think the problem is that the program doesnt find de "cpp" of vfw.h wich is somthing like a dynamic library that maybe i dont know how to link it to the program....

    Can any body help me?

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: problem with vfw lib

    Qt Code:
    1. win32:LIBS += -LC:\QT\2009.04\mingw\lib /
    2. -llibvfw32
    To copy to clipboard, switch view to plain text mode 

    the -L states library search path
    the -l states the lib it self.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. The following user says thank you to high_flyer for this useful post:

    cae (13th November 2009)

  4. #3
    Join Date
    Nov 2009
    Posts
    39
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: problem with vfw lib

    Thanks!!! but....

    Qt Code:
    1. c:\Documents and Settings\Cesar\Escritorio\PruebaZeus\Zeus\Zeus.pro:48: Parse Error ('-llibvfw32')
    2. Error processing project file: Zeus.pro
    3. mingw32-make: *** [makefile] Error 3
    4. Exited with code 2.
    5. Error while building project Zeus
    6. When executing build step 'Make'
    To copy to clipboard, switch view to plain text mode 

    does itself know that the functions are explained in the libvfw32 without telling him that?

    anyway the error seems to be that the file is not found?

    by the way, i installed qt with mingw, i read it had to use *.a libs instead of *.dll, but it's that file the one i'm trying to define there....

  5. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: problem with vfw lib

    No the error is a parsing error, and it was my mistake:
    Qt Code:
    1. win32:LIBS += -LC:\QT\2009.04\mingw\lib \
    2. -llibvfw32
    To copy to clipboard, switch view to plain text mode 

    I used '/' instead of '\' for the line break.

    libname.a and libname.so are unix types for static and shared libs.

    But as IFAIK (can't remember any more) MinGW under windows should support both the unix and windows types.

    So if your lib is a *.a use -llibvfw32.a or -lLibvfw32.lib depending on what you have.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  6. #5
    Join Date
    Nov 2009
    Posts
    39
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: problem with vfw lib

    THANKSSSSS!!!!!! it works!!!!!

    I've been 2 days trying it, but finally.... if i knew it i would have written beffore!!

Similar Threads

  1. Problem with QAbstractListModel
    By eekhoorn12 in forum Qt Programming
    Replies: 3
    Last Post: 26th August 2009, 14:26
  2. Replies: 1
    Last Post: 23rd April 2009, 09:05
  3. Replies: 19
    Last Post: 3rd April 2009, 23:17
  4. Grid Layout Problem
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 12:45
  5. fftw problem
    By lordy in forum General Programming
    Replies: 1
    Last Post: 16th March 2006, 21:36

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.