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. Problem build: "This file was generated using the moc from 4.7.4. It"
Forum Updated to NodeBB v4.3 + New Features

Problem build: "This file was generated using the moc from 4.7.4. It"

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 4.2k Views 1 Watching
  • 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.
  • BlackSPB Offline
    BlackSPB Offline
    BlackSP
    wrote on last edited by
    #1

    Hi, I´m studying Qt, specifically I´m trying to connect Arduino with Qt to create a GUI for configure a Arduino board.

    I´m using Firmata library for Arduino and Firmatator library (available in this link: https://github.com/dh1tw/firmatator).

    Well, my problem is in firmatator library. When I build “firmatator_examples.pro”, I get this error:
    …\include\firmatator\moc_fdevice.cpp:14: error: C1189: #error : "This file was generated using the moc from 4.7.4. It"

    I think that the problem is due to in this project there is a copy of “QtSerialPort” pre-built and more old (year 2013) than my installed version of “QtSerialPort”. I suppose that I have to do changes in the file .pro but I don´t know…

    I add code of firmatator_examples.pro:

    QT += core

    QT -= gui

    TARGET = firmatator_examples
    CONFIG += console
    CONFIG -= app_bundle

    TEMPLATE = app

    SOURCES += main.cpp
    include/firmatator/moc_serialport.cpp
    ftest.cpp

    #win32:CONFIG(release, debug|release): LIBS += -L$$PWD/include/firmatator/release/ -lfirmatator
    #else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/include/firmatator/debug/ -lfirmatator
    #else:symbian: LIBS += -lfirmatator
    #else:unix: LIBS += -L$$PWD/include/firmatator/ -lfirmatator

    #INCLUDEPATH += $$PWD/include/firmatator
    #DEPENDPATH += $$PWD/include/firmatator

    HEADERS +=
    include/firmatator/firmatator.h
    include/firmatator/fdevice.h
    ftest.h

    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/include/firmatator/release/ -lfirmatator
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/include/firmatator/debug/ -lfirmatator
    else:symbian: LIBS += -lfirmatator
    else:unix: LIBS += -L$$PWD/include/firmatator/ -lfirmatator

    INCLUDEPATH += $$PWD/include/firmatator
    DEPENDPATH += $$PWD/include/firmatator

    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/include/QSerialDevice/release/ -lSerialPort
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/include/QSerialDevice/debug/ -lSerialPort
    else:symbian: LIBS += -lSerialPort
    else:unix: LIBS += -L$$PWD/include/QSerialDevice/ -lSerialPort

    INCLUDEPATH += $$PWD/include/QSerialDevice
    DEPENDPATH += $$PWD/include/QSerialDevice

    PD: I have QT 5.4.1 (MSVC 2013 32 bit) with Qt Creator 3.3.1.
    Sorry for my English and I wait replies :-)

    Thanks in advance.

    1 Reply Last reply
    0
    • jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      moc_*.cpp files are usually created during compilation of a Qt project.
      I don't know why they are included in firmatator_build/
      Delete the firmatator_build/ directory and try again.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      BlackSPB 1 Reply Last reply
      0
      • jsulmJ jsulm

        moc_*.cpp files are usually created during compilation of a Qt project.
        I don't know why they are included in firmatator_build/
        Delete the firmatator_build/ directory and try again.

        BlackSPB Offline
        BlackSPB Offline
        BlackSP
        wrote on last edited by
        #3

        @jsulm Thanks for reply.
        I have tried it and it appears the same error..

        mrjjM 1 Reply Last reply
        0
        • BlackSPB BlackSP

          @jsulm Thanks for reply.
          I have tried it and it appears the same error..

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @BlackSP
          hi
          just to confirm:
          you deleted the old included build folder ?
          https://github.com/dh1tw/firmatator/tree/master/firmatator_build

          moc_fdevice.cpp First upload 3 years ago
          moc_fdevice.o First upload 3 years ago
          moc_serialport.cpp First upload 3 years ago
          moc_serialport.o First upload 3 years ago

          1 Reply Last reply
          0
          • BlackSPB Offline
            BlackSPB Offline
            BlackSP
            wrote on last edited by BlackSP
            #5

            Yes, exactly. I have done that. Also I tried to delete all files moc*.cpp/o of folder "firmatator_examples_build" and nothing... I do not know what else to do...

            Thanks for reply.

            mrjjM 1 Reply Last reply
            0
            • BlackSPB BlackSP

              Yes, exactly. I have done that. Also I tried to delete all files moc*.cpp/o of folder "firmatator_examples_build" and nothing... I do not know what else to do...

              Thanks for reply.

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by mrjj
              #6

              @BlackSP said:

              generated using the moc from 4.7.4

              It still say that even you are 100% sure you deleted it. ?
              That is very strange.

              To be be sure.
              besides QT 5.4.1, u dont have any 4.X installed?

              Did u also clean your real build folder?
              ( maybe project points to the one we call "old")
              Please check in Project Tab/button.

              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