Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Japanese
  4. Qapplication.h:134:36: error: expected identifier before 'void'
QtWS25 Last Chance

Qapplication.h:134:36: error: expected identifier before 'void'

Scheduled Pinned Locked Moved Japanese
5 Posts 3 Posters 3.4k 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.
  • D Offline
    D Offline
    DICE-K24
    wrote on last edited by
    #1

    [環境]
    ・OS:fedora15
    ・Qt-4.8.6
    ・Qt Creator-3.2.0
    ・GCCコンパイラ

    [現象]
    動作実績のあるQtプロジェクトを、異なる環境へ移植する事を試みています。
    しかし、以下のコンパイルエラーとなります。解決法をご教授頂けないでしょうか。

    g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Trolltech/Qt-4.8.6/mkspecs/linux-g++ -I. -I/usr/local/Trolltech/Qt-4.8.6/include/QtCore -I/usr/local/Trolltech/Qt-4.8.6/include/QtGui -I/usr/local/Trolltech/Qt-4.8.6/include -I/usr/local/include/hoge -I/usr/include -I. -I. -o mainwindow.o mainwindow.cpp
    In file included from /usr/local/Trolltech/Qt-4.8.6/include/QtGui/QApplication:1:0,
    from ui_mainwindow.h:14,
    from mainwindow.cpp:2:
    /usr/local/Trolltech/Qt-4.8.6/include/QtGui/qapplication.h:134:36: error: expected identifier before 'void'
    /usr/local/Trolltech/Qt-4.8.6/include/QtGui/qapplication.h:134:52: error: two or more data types in declaration of 'visual'
    /usr/local/Trolltech/Qt-4.8.6/include/QtGui/qapplication.h:134:53: error: expected ')' before ',' token
    /usr/local/Trolltech/Qt-4.8.6/include/QtGui/qapplication.h:134:59: error: expected unqualified-id before 'void'
    /usr/local/Trolltech/Qt-4.8.6/include/QtGui/qapplication.h:135:60: error: expected identifier before 'void'
    /usr/local/Trolltech/Qt-4.8.6/include/QtGui/qapplication.h:135:76: error: two or more data types in declaration of 'visual'
    /usr/local/Trolltech/Qt-4.8.6/include/QtGui/qapplication.h:135:77: error: expected ')' before ',' token
    /usr/local/Trolltech/Qt-4.8.6/include/QtGui/qapplication.h:135:5: error: 'QApplication::QApplication(...)' cannot be overloaded
    /usr/local/Trolltech/Qt-4.8.6/include/QtGui/qapplication.h:134:5: error: with 'QApplication::QApplication(...)'
    /usr/local/Trolltech/Qt-4.8.6/include/QtGui/qapplication.h:135:83: error: expected unqualified-id before 'void'
    make: *** [mainwindow.o] Error 1
    18:00:38: プロセス "/usr/bin/make" はコード 2 で終了しました。

    なお、移植先と移植元は同じ環境ですが、PC自体が異なります。
    移植先はfedoraを導入したばかりで、環境設定が不足している可能性があります。

    以上、よろしくお願いいたします。

    1 Reply Last reply
    0
    • IamSumitI Offline
      IamSumitI Offline
      IamSumit
      wrote on last edited by
      #2

      やあ
      あなたが見ることができ、あなたの
      mainwindow.h
      mainwindow.cpp
      qapplication.h

      Be Cute

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DICE-K24
        wrote on last edited by
        #3

        Hi IamSumit

        Thank you for your answer.
        But, I can not understand.
        Please re-post in English.

        1 Reply Last reply
        0
        • C Offline
          C Offline
          chung.k
          wrote on last edited by
          #4

          間違えて投稿しました。すみません。

          1 Reply Last reply
          0
          • C Offline
            C Offline
            chung.k
            wrote on last edited by
            #5

            間違えて投稿しました。すみません。

            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