Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. How to use the libpng in Qt Widgets Application?
Forum Updated to NodeBB v4.3 + New Features

How to use the libpng in Qt Widgets Application?

Scheduled Pinned Locked Moved 3rd Party Software
libpng
5 Posts 3 Posters 2.5k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gdgoldlion
    wrote on last edited by gdgoldlion
    #1

    I want to use libpng in iOS and mac.
    I know that Qt integration libpng,but I can‘t find it.⊙▽⊙
    Where is libpng's .h file in QtSDK?
    My QtSDK version is 5.5
    THX..

    1 Reply Last reply
    0
    • H Offline
      H Offline
      Huulivoide
      wrote on last edited by
      #2

      Qt doesn't expose those, as one is expected to use the Qt's own image
      classes. As for every other 3rdparty library, none of the headers are shipped
      and as far as I know most of if not all of the stuff is linked statically to the
      appropriate qt library by default.

      G 1 Reply Last reply
      0
      • H Huulivoide

        Qt doesn't expose those, as one is expected to use the Qt's own image
        classes. As for every other 3rdparty library, none of the headers are shipped
        and as far as I know most of if not all of the stuff is linked statically to the
        appropriate qt library by default.

        G Offline
        G Offline
        gdgoldlion
        wrote on last edited by
        #3

        @Huulivoide
        Thanks for your posts.
        I am using libpng source file that is download from libpng site in my project.
        But there are many redefine errors in iOS , like this:

        ===================
        duplicate symbol _png_set_sig_bytes in:
        /Users/goldlion/Documents/workspace/Qt/build-qt_opengles2-iphonesimulator_clang_Qt_5_5_0_for_iOS-Debug/qt_opengles2.build/Debug-iphonesimulator/qt_opengles2.build/Objects-normal/i386/png.o
        /Applications/Qt5.5.0/5.5/ios/lib/libQt5Gui_iphonesimulator_debug.a(png.o)
        duplicate symbol _png_sig_cmp in:
        /Users/goldlion/Documents/workspace/Qt/build-qt_opengles2-iphonesimulator_clang_Qt_5_5_0_for_iOS-Debug/qt_opengles2.build/Debug-iphonesimulator/qt_opengles2.build/Objects-normal/i386/png.o
        /Applications/Qt5.5.0/5.5/ios/lib/libQt5Gui_iphonesimulator_debug.a(png.o)
        duplicate symbol _png_zalloc in:
        /Users/goldlion/Documents/workspace/Qt/build-qt_opengles2-iphonesimulator_clang_Qt_5_5_0_for_iOS-Debug/qt_opengles2.build/Debug-iphonesimulator/qt_opengles2.build/Objects-normal/i386/png.o
        /Applications/Qt5.5.0/5.5/ios/lib/libQt5Gui_iphonesimulator_debug.a(png.o)
        duplicate symbol _png_zfree in:
        ...

        And it works good in mac.⊙▽⊙
        But they are one same project.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi and welcome to devnet,

          The only place you'll find libpng with Qt is in the sources. It fails on iOS because iOS is a static build so it already contains all the symbols of the jpeg library it uses.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          G 1 Reply Last reply
          0
          • SGaistS SGaist

            Hi and welcome to devnet,

            The only place you'll find libpng with Qt is in the sources. It fails on iOS because iOS is a static build so it already contains all the symbols of the jpeg library it uses.

            G Offline
            G Offline
            gdgoldlion
            wrote on last edited by
            #5

            @SGaist
            THX,it's work good.
            I think this way is best way.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved