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
Forum Updated to NodeBB v4.3 + New Features

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.
  • S Offline
    S Offline
    sonichy
    wrote on 20 Oct 2018, 14:59 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

    J 1 Reply Last reply 20 Oct 2018, 15:15
    0
    • S sonichy
      20 Oct 2018, 14:59

      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

      J Offline
      J Offline
      JonB
      wrote on 20 Oct 2018, 15:15 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

      1/2

      20 Oct 2018, 14:59

      • Login

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