Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Want to get -lpng in QtGui.pc while making static libraries of Qt4.3.3



  • HI

    While making static libraries of QT . I gave following configure options

    ./configure -release -static -largefile -qt-libpng -glib -platform linux-g++-64 -confirm-license -no-openssl -no-qdbus -prefix ./static_new_1 -prefix-install -opengl -sm -lSM -lICE -xshape -lX11 -xinerama -lXinerama -xcursor -lXcursor -xfixes -lXfixes -xrandr -lXrandr -xrender -lXrender -fontconfig -lfontconfig -tablet -lXi -xkb -glib -lglib-2.0 -lXext -lz -lgthread-2.0

    Actual output is L but I get following QtGui.pc file

    Libs: -L${libdir} -lQtGui -L/PathToLib/lib -L/usr/X11R6/lib64 -lQtCore -L/PathToLib/lib -lSM -lICE -lz -pthread -L/lib64 -lgthread-2.0 -lglib-2.0 -lrt -lpthread -lXi -lXrender -lXra ndr -lXfixes -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lm -ldl

    But I wanT to get -lpng in QtGui.pc

    Libs: -L${libdir} -lQtGui -L/Pathtolib/lib -L/usr/X11R6/lib64 -lpng -lSM -lICE -lQtCore -L /Pathtolib/lib -lz -pthread -lgthread-2.0 -lglib-2.0 -lrt -lpthread -lXi -lXrender -lXrandr -lXfixes -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lm -ldl

    Cflags: -DQT_SHARED -I/PathtoInlcude/include -I${includedir}

    Can some one guide what ./configure option can enable to me to -lpng in QtGui.pc

    Libs: -L${libdir} -lQtGui -L/Pathtolib/lib -L/usr/X11R6/lib64 -lpng -lSM -lICE -lQtCore -L /Pathtolib/lib -lz -pthread -lgthread-2.0 -lglib-2.0 -lrt -lpthread -lXi -lXrender -lXrandr -lXfixes -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lm -ldl


  • Lifetime Qt Champion

    Hi,

    Why do you need that ? Are you getting any specific error ?



  • No Error but I am not get any such flag


  • Lifetime Qt Champion

    Because it's not needed in your case. You are configuring to use Qt's bundled libpng. That one is statically compiled.



  • Is there any documentation , that says

    which ./configure option lead the what option in pkgconfig/QtGui.pc and pkgconfig/QtCore.pc

    Is there any expert who can guide me on that , beacuse I have a golden QtGui.pc and QtCore.pc

    golden and I want to get the gold QtGui.pc and Qtcore.pc For qt static libraries and I want what configure option will lead to this QtGui.pc and QtCore.pc

    QtGui.pc

    prefix=/PathtoQT/qt-4.3.3
    exec_prefix=${prefix}
    libdir=${prefix}/lib
    includedir=${prefix}/include/QtGui
    qt_config=lex yacc warn_on uic resources qt warn_on release incremental link_prl no_mocdepend release qt_no_framework release static largefile separate_debug_info mmx sse sse2 dylib create_prl link_prl depend_includepath QTDIR_build x11 qt_install_headers qt warn_on depend_includepath qmake_cache target_qt create_libtool create_pc explicitlib x11sm opentype moc thread x11lib x11inc
    moc_location=/PATHTOQT/qt-4.3.3/bin/moc
    uic_location=/PATHTOQT/qt-4.3.3/bin/uic

    Name: Qtgui
    Description: Qtgui Library
    Version: 4.3.3
    Libs: -L${libdir} -lQtGui -L/PATHTOQT/qt-4.3.3/lib -L/usr/X11R6/lib64 -lpng -lSM -lICE -lQtCore -L/PATHTPQT/qt-4.3.3/lib -lz -pthread -lgthread-2.0 -lglib-2.0 -lrt -lpthread -lXi -lXrender -lXrandr -lXfixes -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lm -ldl
    Cflags: -DQT_SHARED -I/PATHTOQT/qt-4.3.3/include -I${includedir}

    QtCore.pc

    prefix=/PathToQt/qt-4.3.3
    exec_prefix=${prefix}
    libdir=${prefix}/lib
    includedir=${prefix}/include/QtCore
    qt_config=lex yacc warn_on uic resources qt warn_on release incremental link_prl no_mocdepend release qt_no_framework release largefile separate_debug_info mmx sse sse2 dylib create_prl link_prl depend_includepath QTDIR_build qt_install_headers qt warn_on depend_includepath qmake_cache target_qt create_libtool create_pc explicitlib moc thread
    moc_location=/PAthtoQT/qt-4.3.3/bin/moc
    uic_location=/PathtoQt/qt-4.3.3/bin/uic

    Name: Qtcore
    Description: Qtcore Library
    Version: 4.3.3
    Libs: -L${libdir} -lQtCore -L/PathToQT/qt-4.3.3/lib -lz -lm -pthread -lgthread-2.0 -lglib-2.0 -lrt -lpthread -ldl
    Cflags: -DQT_SHARED -I/PAthtoQT/qt-4.3.3/include -I${includedir}


  • Lifetime Qt Champion

    AFAIK, no there's not.

    What is your exact need for that information ?



  • I want to make static libraries of Qt 4.3.3 and the results QtGui.pc and QtCore.pc should look like

    Want resultant QtGui.pc

     prefix=/PathtoQT/qt-4.3.3
     exec_prefix=${prefix}
    

    libdir=${prefix}/lib
    includedir=${prefix}/include/QtGui
    qt_config=lex yacc warn_on uic resources qt warn_on release incremental link_prl no_mocdepend release qt_no_framework release static largefile separate_debug_info mmx sse sse2 dylib create_prl link_prl depend_includepath QTDIR_build x11 qt_install_headers qt warn_on depend_includepath qmake_cache target_qt create_libtool create_pc explicitlib x11sm opentype moc thread x11lib x11inc
    moc_location=/PATHTOQT/qt-4.3.3/bin/moc
    uic_location=/PATHTOQT/qt-4.3.3/bin/uic

    Name: Qtgui
    

    Description: Qtgui Library
    Version: 4.3.3
    Libs: -L${libdir} -lQtGui -L/PATHTOQT/qt-4.3.3/lib -L/usr/X11R6/lib64 -lpng -lSM -lICE -lQtCore -L/PATHTPQT/qt-4.3.3/lib -lz -pthread -lgthread-2.0 -lglib-2.0 -lrt -lpthread -lXi -lXrender -lXrandr -lXfixes -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lm -ldl
    Cflags: -DQT_SHARED -I/PATHTOQT/qt-4.3.3/include -I${includedir}

    Want QtCore.pc should like

    prefix=/PathToQt/qt-4.3.3
    exec_prefix=${prefix}
    

    libdir=${prefix}/lib
    includedir=${prefix}/include/QtCore
    qt_config=lex yacc warn_on uic resources qt warn_on release incremental link_prl no_mocdepend release qt_no_framework release largefile separate_debug_info mmx sse sse2 dylib create_prl link_prl depend_includepath QTDIR_build qt_install_headers qt warn_on depend_includepath qmake_cache target_qt create_libtool create_pc explicitlib moc thread
    moc_location=/PAthtoQT/qt-4.3.3/bin/moc
    uic_location=/PathtoQt/qt-4.3.3/bin/uic

    Name: Qtcore
    Description: Qtcore Library
    Version: 4.3.3
    Libs: -L${libdir} -lQtCore -L/PathToQT/qt-4.3.3/lib -lz -lm -pthread -lgthread-2.0 -lglib-2.0 -lrt -lpthread -ldl
    Cflags: -DQT_SHARED -I/PAthtoQT/qt-4.3.3/include -I${includedir}

    I want to know what option in configure will lead to such Qtgui.pc and QtCore.pc


  • Lifetime Qt Champion

    AFAIK, these files are generated when building Qt.

    What is your use case ?



  • the use case is

    configure -static -release -largefile -system-libpng -glib -confirm-license -no-openssl -no-qdbus -prefix /PathToQt/static_libraries -prefix-install

    I am getting QtGui.pc as

    prefix=/Path/static_libraries
    exec_prefix=${prefix}
    libdir=${prefix}/lib
    includedir=${prefix}/include/QtGui
    

    qt_config=lex yacc warn_on uic resources qt warn_on release incremental link_prl no_mocdepend release stl qt_no_framework release static largefile stl precompile_header mmx 3dnow sse sse2 dylib create_prl link_prl depend_includepath QTDIR_build use_libmysqlclient_r x11 qt_install_headers qt warn_on depend_includepath qmake_cache target_qt hide_symbols create_libtool create_pc explicitlib x11sm opentype moc thread x11lib x11inc staticlib static
    moc_location=/in/inndt69/Projects/FRESH_QT/qt-x11-commercial-src-4.3.3/qt-x11-commercial-src-4.3.3/bin/moc
    uic_location=/PATHTOQT/bin/uic

    Name: Qtgui
    Description: Qtgui Library
    Version: 4.3.3
    Libs: -L${libdir} -lQtGui -L/PATHTOQT/qt-4.3.3/lib -L/usr/X11R6/lib64 -lpng -lSM -lICE -lQtCore -L/PAthTOQT/lib -lz -pthread -L/lib64 -lgthread-2.0 -lglib-2.0 -lrt -lpthread -lXi -lXrender -lXrandr -lXfixes -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lm -ldl
    Cflags: -I/PathToQT/static_libraries/include -I${includedir}


  • Lifetime Qt Champion

    That's not a use case. The question is: why do you need these .pc files following the specific content you want them to have ?


Log in to reply