Results 1 to 8 of 8

Thread: load gstreamer runtime library dll to QT4

  1. #1
    Join Date
    Apr 2015
    Posts
    4
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default load gstreamer runtime library dll to QT4

    hello everybody. Iam using qt4 on windows and i having troubles by adding the main gstream runtime library libgstreamer-0.10-0.dll to the project.
    I am already add the necessary libs and include in my .pro:

    unix|win32: LIBS += -L$$PWD/C:/gstreamer-sdk/0.10/x86_64/lib/ \
    C:/gstreamer-sdk/0.10/x86_64/lib/gstreamer-0.10.lib \
    C:/gstreamer-sdk/0.10/x86_64/lib/gobject-2.0.lib \
    C:/gstreamer-sdk/0.10/x86_64/lib/gmodule-2.0.lib \
    C:/gstreamer-sdk/0.10/x86_64/lib/gthread-2.0.lib \
    C:/gstreamer-sdk/0.10/x86_64/lib/xml2.lib \
    C:/gstreamer-sdk/0.10/x86_64/lib/glib-2.0.lib \
    C:/gstreamer-sdk/0.10/x86_64/lib/intl.lib

    INCLUDEPATH += C:/gstreamer-sdk/0.10/x86_64/include \
    C:/gstreamer-sdk/0.10/x86_64/include/gstreamer-0.10 \
    C:/gstreamer-sdk/0.10/x86_64/include/glib-2.0 \
    C:/gstreamer-sdk/0.10/x86_64/lib/glib-2.0/include \
    C:/gstreamer-sdk/0.10/x86_64/include/libxml2

    DEPENDPATH += C:/gstreamer-sdk/0.10/x86_64/include \
    C:/gstreamer-sdk/0.10/x86_64/include/gstreamer-0.10 \
    C:/gstreamer-sdk/0.10/x86_64/include/glib-2.0 \
    C:/gstreamer-sdk/0.10/x86_64/lib/glib-2.0/include \
    C:/gstreamer-sdk/0.10/x86_64/include/libxml2

    these information was extracted from the pkg-config application. however as i said i need to load the library at run time. The case is that the code:


    QLibrary myLib("C:\gstreamer-sdk\0.10\x86_64\bin\libgstreamer-0.10-0.dll");
    if(myLib.isLoaded())
    qDebug("Loading done");
    else
    qDebug("Upppss");

    return me "Upppss" every time. I just read the qlibrary doc but i can even load the library. Any help is appreciated.

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,540
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: load gstreamer runtime library dll to QT4

    First of all : ABC of C/C++ language. It should be :
    Qt Code:
    1. QLibrary myLib("C:\\gstreamer-sdk\\0.10\\x86_64\\bin\\libgstreamer-0.10-0.dll");
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: load gstreamer runtime library dll to QT4

    Or using forward slashes.

    Cheers,
    _

  4. #4
    Join Date
    Apr 2015
    Posts
    4
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: load gstreamer runtime library dll to QT4

    still nothing:
    i just tried with
    Qt Code:
    1. QLibrary myLib("C:/gstreamer-sdk/0.10/x86_64/bin/libgstreamer-0.10-0.dll");
    2. //and
    3. QLibrary myLib("C:\\gstreamer-sdk\\0.10\\x86_64\\bin\\libgstreamer-0.10-0.dll");
    To copy to clipboard, switch view to plain text mode 

    thanks


    Added after 16 minutes:


    is there a chance that a dll cannot be load?
    ...
    I already added gstreamer to Dev c++ an Visual studio but still cannot added to QT. However Qt is my primary interest. The only thin i need is to add the library at runtime becase gstreamer need to. I already added to the -L compilers flags in .pro file:

    Qt Code:
    1. unix|win32: LIBS += -L$$PWD/C:/gstreamer-sdk/0.10/x86_64/lib/ \
    2. C:/gstreamer-sdk/0.10/x86_64/bin/libgstreamer-0.10-0.dll \
    3. C:/gstreamer-sdk/0.10/x86_64/lib/gstreamer-0.10.lib \
    4. C:/gstreamer-sdk/0.10/x86_64/lib/gobject-2.0.lib \
    5. C:/gstreamer-sdk/0.10/x86_64/lib/gmodule-2.0.lib \
    6. C:/gstreamer-sdk/0.10/x86_64/lib/gthread-2.0.lib \
    7. C:/gstreamer-sdk/0.10/x86_64/lib/xml2.lib \
    8. C:/gstreamer-sdk/0.10/x86_64/lib/glib-2.0.lib \
    9. C:/gstreamer-sdk/0.10/x86_64/lib/intl.lib
    To copy to clipboard, switch view to plain text mode 
    still nothing
    thanks
    Last edited by israelariel; 15th April 2015 at 03:26.

  5. #5
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: load gstreamer runtime library dll to QT4

    Quote Originally Posted by israelariel View Post
    The only thin i need is to add the library at runtime becase gstreamer need to.
    Usually gstreamer is linked like any other library. What is your specific need of loading it manually?

    Quote Originally Posted by israelariel View Post
    I already added to the -L compilers flags in .pro file:

    Qt Code:
    1. unix|win32: LIBS += -L$$PWD/C:/gstreamer-sdk/0.10/x86_64/lib/ \
    2. C:/gstreamer-sdk/0.10/x86_64/bin/libgstreamer-0.10-0.dll \
    3. C:/gstreamer-sdk/0.10/x86_64/lib/gstreamer-0.10.lib \
    4. C:/gstreamer-sdk/0.10/x86_64/lib/gobject-2.0.lib \
    5. C:/gstreamer-sdk/0.10/x86_64/lib/gmodule-2.0.lib \
    6. C:/gstreamer-sdk/0.10/x86_64/lib/gthread-2.0.lib \
    7. C:/gstreamer-sdk/0.10/x86_64/lib/xml2.lib \
    8. C:/gstreamer-sdk/0.10/x86_64/lib/glib-2.0.lib \
    9. C:/gstreamer-sdk/0.10/x86_64/lib/intl.lib
    To copy to clipboard, switch view to plain text mode 
    Usually LIBS contains -L directives for paths and -l directives for libraries, e.g.
    Qt Code:
    1. LIBS += -L/some/path -lsome_lib_name_without_extension
    To copy to clipboard, switch view to plain text mode 

    Cheers,
    _

  6. #6
    Join Date
    Apr 2015
    Posts
    4
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: load gstreamer runtime library dll to QT4

    the thing is that if i added in the .pro file as lib qt return to me an error of file format not recognized.
    sorry for the trouble
    thanks

  7. #7
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: load gstreamer runtime library dll to QT4

    Can you post that error?

    Maybe you have incompatible compilers or architectures (e.g. 32 vs 64it)

    Cheers,
    _

  8. #8
    Join Date
    Apr 2015
    Posts
    4
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: load gstreamer runtime library dll to QT4

    the error is just what i just posted .. at building process, qt just return error of file format not recognized and open the dll code once i double-click on the error, by show me a lot of number sequence from the dll.
    i using 64 bits arquitecture and qt 4.8.0, about dll...
    well i just install the gstreamer using its own instaler and that process build by its own dlls, executables etc... but thing is that i can use the library with VS and the MInGW's comming with Devc++ IDE. What it does means?

    Is there a test can i performance so things can be clearer?

Similar Threads

  1. Replies: 13
    Last Post: 11th February 2015, 20:37
  2. how to add gstreamer library in qt?
    By shakthi in forum Newbie
    Replies: 1
    Last Post: 22nd December 2011, 12:03
  3. Qt-X11 & QT Runtime library RPM's... or SRPMS
    By codematic in forum Installation and Deployment
    Replies: 0
    Last Post: 11th November 2010, 00:02
  4. Latest QT Runtime Library RPM's ?
    By codematic in forum Installation and Deployment
    Replies: 2
    Last Post: 1st November 2010, 20:04
  5. Replies: 3
    Last Post: 6th March 2008, 11:55

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
  •  
Qt is a trademark of The Qt Company.