Results 1 to 7 of 7

Thread: using multimedia and image plugins with static build of Qt

  1. #1
    Join Date
    Jan 2013
    Location
    Iran
    Posts
    12
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows Android

    Default using multimedia and image plugins with static build of Qt

    I built Qt 5.1 from source code with these options -->
    Qt Code:
    1. configure -release -platform win32-msvc2012 -nomake demos -nomake examples -nomake tests -opengl desktop -qt-sql-sqlite -audio-backend -static -opensource -ltcg
    To copy to clipboard, switch view to plain text mode 

    Then I built my own program using static librarys but when I test the program it doesnt play sound or showing images !!!
    my pro file :
    Qt Code:
    1. #-------------------------------------------------
    2. #
    3. # Project created by QtCreator 2013-07-16T15:55:35
    4. #
    5. #-------------------------------------------------
    6.  
    7.  
    8. QT += core gui multimedia sql
    9.  
    10. greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    11. CONFIG += static
    12.  
    13.  
    14. TARGET = Award
    15. TEMPLATE = app
    16.  
    17.  
    18. SOURCES += main.cpp\
    19. mainwindow.cpp \
    20. menuItems.cpp \
    21. option.cpp \
    22. random.cpp \
    23. randompic.cpp \
    24. screen.cpp \
    25. soundhandler.cpp \
    26. database.cpp \
    27. editinformation.cpp \
    28. informationreview.cpp \
    29. option_color.cpp \
    30. animationscreen.cpp \
    31. speaklabel.cpp \
    32. setProperties.cpp
    33.  
    34. HEADERS += mainwindow.h \
    35. option.h \
    36. random.h \
    37. randompic.h \
    38. screen.h \
    39. soundhandler.h \
    40. database.h \
    41. editinformation.h \
    42. informationreview.h \
    43. animationscreen.h \
    44. speaklabel.h
    45.  
    46. FORMS += mainwindow.ui \
    47. option.ui \
    48. editinformation.ui \
    49. informationreview.ui
    50.  
    51. RESOURCES += \
    52. myRes.qrc
    53. RC_FILE = myapp.rc
    To copy to clipboard, switch view to plain text mode 

    Command that I used for building program using visual studio command prompt -->
    Qt Code:
    1. cd C:\Users\Omid\Desktop\Award\Award\
    2. C:\Qt\vsStatic\qtbase\bin\qmake.exe C:\Users\Omid\Desktop\Award\Award\Award.pro
    3. nmake
    To copy to clipboard, switch view to plain text mode 

    How can I use multimedia and jpeg plugins in static build ?!!
    Last edited by omid_kma; 31st July 2013 at 11:09.

  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: using multimedia and image plugins with static build of Qt

    You need to build static versions of the plugins, then link your application against those static plugins and use the Q_IMPORT_PLUGIN macros in your app to initialize linked static plugins.
    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. The following user says thank you to wysota for this useful post:

    omid_kma (31st July 2013)

  4. #3
    Join Date
    Jan 2013
    Location
    Iran
    Posts
    12
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: using multimedia and image plugins with static build of Qt

    I checked the plugins folder It seems they have been built
    for example this folder :C:\Qt\vsStatic\qtbase\plugins\imageformats contains these files
    Qt Code:
    1. qico.lib
    2. qico.prl
    3. qicod.prl
    4.  
    5. qmng.lib
    6. qmng.prl
    7. qmngd.prl
    8.  
    9. qsvg.lib
    10. qsvg.prl
    11. qsvgd.prl
    12.  
    13. qtga.lib
    14. qtga.prl
    15. qtgad.pel
    16.  
    17. qtiff.lib
    18. qtiff.prl
    19. qtiffd.prl
    20.  
    21. qwbmp.lib
    22. qwbmp.prl
    23. qwbmpd.prl
    To copy to clipboard, switch view to plain text mode 
    What should I put in .pro file now ?(I didn't find anything useful in other sites ! can you provide me an example?)

  5. #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: using multimedia and image plugins with static build of Qt

    Read the docs on "Static Plugins".
    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.


  6. The following user says thank you to wysota for this useful post:

    omid_kma (31st July 2013)

  7. #5
    Join Date
    Jan 2013
    Location
    Iran
    Posts
    12
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: using multimedia and image plugins with static build of Qt

    Quote Originally Posted by wysota View Post
    Read the docs on "Static Plugins".
    Thanks I added these lines to .pro file and It's ok now
    Qt Code:
    1. QTPLUGIN += qmng\
    2. qico\
    3. qsvg\
    4. qtga\
    5. qtiff\
    6. qwbmp\
    7. qtmedia_audioengine\
    8. dsengine\
    9. wmfengine\
    10. qtmultimedia_m3u\
    11. qwindows
    To copy to clipboard, switch view to plain text mode 

  8. #6
    Join Date
    Jan 2013
    Location
    Iran
    Posts
    12
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: using multimedia and image plugins with static build of Qt

    Now I have another problem
    When I tried to run program in another pc it give error that :msvcr110.dll and msvcp110.dll is missing
    How can I link program to these dll s in static way?

  9. #7
    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: using multimedia and image plugins with static build of Qt

    These are dynamic libraries. You need to link their static counterparts (or just distribute them or an installer for the runtime along your application). I think you should consult Visual Studio manual for this.
    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.


  10. The following user says thank you to wysota for this useful post:

    omid_kma (31st July 2013)

Similar Threads

  1. where/what are static plugins?
    By ht1 in forum Qt Programming
    Replies: 22
    Last Post: 18th August 2013, 11:42
  2. Replies: 1
    Last Post: 13th January 2010, 23:35
  3. Program not linking with static image plugins
    By andyp in forum Qt Programming
    Replies: 7
    Last Post: 8th December 2009, 10:15
  4. Replies: 0
    Last Post: 29th October 2009, 19:20
  5. Problems loading static plugins
    By Rodrigo in forum Qt Programming
    Replies: 2
    Last Post: 11th July 2007, 12:42

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.