Results 1 to 6 of 6

Thread: How to make QtMultimedia work on Windows using MSVC

  1. #1
    Join Date
    Jul 2011
    Location
    Paris
    Posts
    31
    Thanks
    5
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default How to make QtMultimedia work on Windows using MSVC

    Hello,

    I have been using QtMultimedia perfectly fine when I downloaded the minGW version of Qt5 on windows, but I had to switch and use the MSVC version and now I cannot make QtMultimedia to work.

    I have added QT += multimedia to my .pro file and at least auto-completion works when I type #include <someMULTIMEDIA class>

    Is there something that I am missing ? Is it “normal” that it doesn’t work now that I am using MSVC as a compiler.

    Any help greatly appreciated.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to make QtMultimedia work on Windows using MSVC

    I have added QT += multimedia to my .pro file and at least auto-completion works
    So what exactly "doesn't work" then?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jul 2011
    Location
    Paris
    Posts
    31
    Thanks
    5
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to make QtMultimedia work on Windows using MSVC

    Well, it doesn't compile actually, I get the error:
    C:\Qt\dev\Projects\TestDev\mainwindow.cpp:3: error: C1083: Cannot open include file: ‘QAudioInput’: No such file or directory

    This was not happening when I was using the minGW version of Qt..

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to make QtMultimedia work on Windows using MSVC

    "It" meaning your project? Do you have a QAudioInput file installed? Where does it reside relative to your Qt installation directory?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Jul 2011
    Location
    Paris
    Posts
    31
    Thanks
    5
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to make QtMultimedia work on Windows using MSVC

    Yes, the project won't compile.

    I have my directory like this:

    C:\Qt\Qt5.0.2\5.0.2\msvc2010\include\QtMultimedia

    In there I have all the header files that I need, QAudioInput, QAudioFormat, etc..

    And in :
    C:\Qt\Qt5.0.2\5.0.2\msvc2010\lib

    I have the installed libraries of the whole framework.

  6. #6
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How to make QtMultimedia work on Windows using MSVC

    Apparently you haven't told MSVC where to find the QtMultimedia directory.

    After modifying your .pro file, did you re-create the MSVC .vcproj file from it? (Using the Qt add-in for MSVC?) This should add the QtMultimedia directory to the set of locations to look for header files.

    Otherwise, you can simply #include each required header as

    Qt Code:
    1. #include <QtMultimedia/QAudioInput>
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Need to make my project file work on both Windows 7 and Mac 10.6
    By KenJustKen in forum Installation and Deployment
    Replies: 0
    Last Post: 14th March 2012, 22:53
  2. Qt Creator Develop with both MSVC and MinGW on Windows
    By bennettm in forum Qt Tools
    Replies: 1
    Last Post: 10th April 2011, 09:49
  3. Can't make NCReport work on Windows
    By pucara_faa in forum Qt Programming
    Replies: 6
    Last Post: 5th April 2011, 13:36
  4. Replies: 8
    Last Post: 16th February 2011, 05:16
  5. How to make this work for Windows Mobile
    By Mr.QT in forum Qt Programming
    Replies: 1
    Last Post: 12th May 2009, 19:12

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.