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

Qt4.8.7 embedded build error gcc/g++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0



  • This is my mkspecs
    include(../../common/linux.conf)
    include(../../common/gcc-base-unix.conf)
    include(../../common/g++-unix.conf)
    include(../../common/qws.conf)

    modifications to g++.conf

    QMAKE_CC = arm-mstar910-linux-gcc
    QMAKE_CXX = arm-mstar910-linux-g++
    QMAKE_LINK = arm-mstar910-linux-g++
    QMAKE_LINK_SHLIB = arm-mstar910-linux-g++

    modifications to linux.conf

    QMAKE_AR = arm-mstar910-linux-ar cqs
    QMAKE_OBJCOPY = arm-mstar910-linux-objcopy
    QMAKE_STRIP = arm-mstar910-linux-strip

    QMAKE_CFLAGS = -std=gnu++98 -fpermissive
    QMAKE_LFLAGS = -std=gnu++98 -fpermissive
    QMAKE_CXXFLAGS = -std=gnu++98 -fpermissive -lts

    include(../../../../build/platform.conf)

    load(qt_config)

    This is error: All errors are in this format
    dialogs/qpagesetupdialog_unix.cpp: In constructor ‘QPageSetupWidget::QPageSetupWidget(QWidget*)’:
    dialogs/qpagesetupdialog_unix.cpp:276:12: error: ‘class Ui::QPageSetupWidget’ has no member named ‘topMargin’
    276 | widget.topMargin->setSuffix(suffix);
    | ^~~~~~~~~
    dialogs/qpagesetupdialog_unix.cpp:277:12: error: ‘class Ui::QPageSetupWidget’ has no member named ‘bottomMargin’
    277 | widget.bottomMargin->setSuffix(suffix);
    | ^~~~~~~~~~~~
    dialogs/qpagesetupdialog_unix.cpp:278:12: error: ‘class Ui::QPageSetupWidget’ has no member named ‘leftMargin’
    278 | widget.leftMargin->setSuffix(suffix);
    | ^~~~~~~~~~
    dialogs/qpagesetupdialog_unix.cpp:279:12: error: ‘class Ui::QPageSetupWidget’ has no member named ‘rightMargin’
    279 | widget.rightMargin->setSuffix(suffix);
    | ^~~~~~~~~~~
    dialogs/qpagesetupdialog_unix.cpp:280:12: error: ‘class Ui::QPageSetupWidget’ has no member named ‘paperWidth’
    280 | widget.paperWidth->setSuffix(suffix);
    | ^~~~~~~~~~
    dialogs/qpagesetupdialog_unix.cpp:281:12: error: ‘class Ui::QPageSetupWidget’ has no member named ‘paperHeight’
    281 | widget.paperHeight->setSuffix(suffix);
    | ^~~~~~~~~~~
    dialogs/qpagesetupdialog_unix.cpp:283:47: error: ‘class Ui::QPageSetupWidget’ has no member named ‘preview’
    283 | QVBoxLayout *lay = new QVBoxLayout(widget.preview);
    | ^~~~~~~
    dialogs/qpagesetupdialog_unix.cpp:284:12: error: ‘class Ui::QPageSetupWidget’ has no member named ‘preview’
    284 | widget.preview->setLayout(lay);
    | ^~~~~~~
    dialogs/qpagesetupdialog_unix.cpp:285:45: error: ‘class Ui::QPageSetupWidget’ has no member named ‘preview’
    285 | m_pagePreview = new QPagePreview(widget.preview);
    | ^~~~~~~
    dialogs/qpagesetupdialog_unix.cpp:294:12: error: ‘class Ui::QPageSetupWidget’ has no member named ‘paperSourceLabel’
    294 | widget.paperSourceLabel->setVisible(false);
    | ^~~~~~~~~~~~~~~~
    dialogs/qpagesetupdialog_unix.cpp:295:12: error: ‘class Ui::QPageSetupWidget’ has no member named ‘paperSource’
    295 | widget.paperSource->setVisible(false);

    configure:
    ./configure -prefix ${DIR_TOP}/_install -no-pch -xplatform qws/arm-mstar910-linux-g++ -arch arm -embedded arm -nomake demos -nomake examples -nomake tests -debug-and-release -qt-freetype -qt-gfx-transformed -no-webkit -no-largefile -fast -release -no-qt3support -no-cups -no-opengl -no-phonon -no-scripttools -no-libtiff -no-libmng -no-nis -no-svg -qt-libjpeg -qt-mouse-pc -qt-mouse-tslib -qt-gfx-transformed ;

    Please help me. thanks


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    From the naming it seems to be related to the printing part.

    Do you also get that error if you use a minimal configure call with just the cross-compilation and nomake parts ?



  • This post is deleted!


  • @SGaist
    First of all, thank you for your answer,Could you please provide minimal configure?

    But,In fact it's not just printing part, such as "error: 'class Ui_QFileDialog' has no member named 'fileTypeCombo';"

    The information that needs to be provided is that my Linux server has undergone reinstallation. This configuration has been successful, but now it is not. I guess it is missing the necessary files to write, but I don't know what would cause such errors at compile time.

    Thanks again for your answer. My English is not very good. I hope you don't mind.


  • Lifetime Qt Champion

    @Ws4453 said in Qt4.8.7 embedded bulid error gcc/g++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0:

    Ui_QFileDialog

    Where was that file located ?

    @Ws4453 said in Qt4.8.7 embedded bulid error gcc/g++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0:

    First of all, thank you for your answer,Could you please provide minimal configure?

    Like I wrote before just keep the cross-compilation parameters and the nomake stuff.



  • This post is deleted!


  • @SGaist “ Ui_QFileDialog”这是qt的默认格式,
    路径:src \ gui \ dialogs,qfiledialog.ui编译时生成Ui_QFileDialog.h


  • Lifetime Qt Champion

    Are you sure that the correct uic version is used ?


Log in to reply