Results 1 to 3 of 3

Thread: Qt static library with jpeg support

  1. #1
    Join Date
    Dec 2006
    Posts
    211
    Thanks
    27
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Exclamation Qt static library with jpeg support

    Hi All,

    I m using Qt 4.2.1 on my Mac Intel.
    I want to bulid qt static library in release mode with jpeg support.
    I configure using following command..

    ./configure -prefix /developer/qt -qt-zlib -qt-libjpeg -qt-libgif -universal -sdk
    /developer/sdks/MacOsX10.4u.sdk -static -release

    It is giving jpeg and jpeg support on configure output but after installing qt it is not giving support to the jpeg and gif images.

    If any one knows the Issue then plzz help me.

    thanks.

  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: Qt static library with jpeg support

    AFAIR you have to enable a static plugin in a project that is to have JPEG support. Consult the docs about static plugins.

  3. #3
    Join Date
    Nov 2006
    Posts
    5
    Thanked 3 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt static library with jpeg support

    It is well documented in the Qt docs.
    Here is the link

    In ur main.cpp add the following :-

    #include <QApplication>
    #include <QtPlugin>

    Q_IMPORT_PLUGIN(qjpeg)
    Q_IMPORT_PLUGIN(qgif)


    int main(int argc, char *argv[])
    {
    QApplication app(argc, argv);
    ...
    return app.exec();
    }


    In your .pro file add the following:-
    QTPLUGIN += qjpeg qgif

    LIBS += -L 'path of the libjpeg.a and libgif.a files' -lqjpeg -lqgif



    Happy Qtying ()

  4. The following user says thank you to tiva for this useful post:

    vishal.chauhan (11th May 2007)

Similar Threads

  1. Wrap a static QT library inside an XPCOM component ?
    By Paul_Xul in forum Qt Programming
    Replies: 2
    Last Post: 3rd August 2010, 07:16
  2. Replies: 16
    Last Post: 23rd May 2008, 10:12
  3. Win32 qmake: building a static library
    By Amanda in forum Qt Programming
    Replies: 5
    Last Post: 8th November 2006, 19:32
  4. Strange Problem with JPEG Support on win XP
    By caligula in forum Installation and Deployment
    Replies: 3
    Last Post: 18th September 2006, 10:36
  5. I got two problems when I used static compiled library of QT4
    By qintm in forum Installation and Deployment
    Replies: 8
    Last Post: 20th April 2006, 08:52

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.