Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. C4430: missing type specifier - int assumed. Note: C++ does not support default-int

C4430: missing type specifier - int assumed. Note: C++ does not support default-int

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 2.3k Views
  • 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.
  • sonichyS Offline
    sonichyS Offline
    sonichy
    wrote on last edited by
    #1

    I write a program well in Linux, but have error in Windows(MSVC2015).
    https://github.com/sonichy/QDBusSAONT
    moc_window.cpp

    QT_INIT_METAOBJECT const QMetaObject MainWindow::staticMetaObject = {
        { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow.data,
          qt_meta_data_MainWindow,  qt_static_metacall, nullptr, nullptr}
    };
    

    C2143: syntax error: missing ';' before 'const'
    C4430: missing type specifier - int assumed. Note: C++ does not support default-int

    https://github.com/sonichy

    JonBJ 1 Reply Last reply
    0
    • sonichyS sonichy

      I write a program well in Linux, but have error in Windows(MSVC2015).
      https://github.com/sonichy/QDBusSAONT
      moc_window.cpp

      QT_INIT_METAOBJECT const QMetaObject MainWindow::staticMetaObject = {
          { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow.data,
            qt_meta_data_MainWindow,  qt_static_metacall, nullptr, nullptr}
      };
      

      C2143: syntax error: missing ';' before 'const'
      C4430: missing type specifier - int assumed. Note: C++ does not support default-int

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @sonichy

      C2143: syntax error: missing ';' before 'const'

      https://code.woboq.org/qt5/qtbase/src/corelib/global/qglobal.h.html#557 :

      557 #if defined(Q_CC_GNU) && defined(Q_OS_WIN) 
      558 #  define QT_INIT_METAOBJECT __attribute__((init_priority(101))) 
      559 #else 
      560 #  define QT_INIT_METAOBJECT 
      561 #endif 
      

      Do you have Q_CC_GNU still defined when you are compiling for MSVC?

      1 Reply Last reply
      1

      • Login

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