Results 1 to 4 of 4

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

  1. #1
    Join Date
    Apr 2016
    Posts
    2
    Qt products
    Qt5
    Platforms
    Windows

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

    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:
    #-------------------------------------------------
    #
    # Project created by QtCreator 2012-05-08T18:37:34
    #
    #-------------------------------------------------

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

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

    Have you tried removing include/firmatator/moc_serialport.cpp from the SOURCES variable?

    Usually that variable only contain actual source files, those generated during the build are tracked automatically.

    Cheers,
    _

  3. #3
    Join Date
    Apr 2016
    Posts
    2
    Qt products
    Qt5
    Platforms
    Windows

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

    I have tried it but now there appeared those errors:
    debug\moc_fdevice.cpp(78) : warning C4273: 'firmatator::FDevice::qt_static_metacall' : vinculación de DLL incoherente
    ....\firmatator-master\build-firmatator_examples-desktop_qt_5_4_1_msvc2013_32bit-debug\debug\../../firmatator_examples/include/firmatator/fdevice.h(18) : vea la definición anterior de 'qt_static_metacall'
    debug\moc_fdevice.cpp(101) : warning C4273: 'staticMetaObject' : vinculación de DLL incoherente
    ....\firmatator-master\build-firmatator_examples-desktop_qt_5_4_1_msvc2013_32bit-debug\debug\../../firmatator_examples/include/firmatator/fdevice.h(18) : vea la definición anterior de 'public: static QMetaObject const firmatator::FDevice::staticMetaObject'
    debug\moc_fdevice.cpp(101) : error C2491: 'firmatator::FDevice::staticMetaObject' : definición de miembro de datos est tico dllimport no permitida
    debug\moc_fdevice.cpp(108) : warning C4273: 'firmatator::FDevice::metaObject' : vinculaciçon de DLL incoherente
    ....\firmatator-master\build-firmatator_examples-desktop_qt_5_4_1_msvc2013_32bit-debug\debug\../../firmatator_examples/include/firmatator/fdevice.h(18) : vea la definición anterior de 'metaObject'
    debug\moc_fdevice.cpp(113) : warning C4273: 'firmatator::FDevice::qt_metacast' : vinculación de DLL incoherente
    ....\firmatator-master\build-firmatator_examples-desktop_qt_5_4_1_msvc2013_32bit-debug\debug\../../firmatator_examples/include/firmatator/fdevice.h(18) : vea la definición anterior de 'qt_metacast'
    debug\moc_fdevice.cpp(121) : warning C4273: 'firmatator::FDevice::qt_metacall' : vinculación de DLL incoherente
    ....\firmatator-master\build-firmatator_examples-desktop_qt_5_4_1_msvc2013_32bit-debug\debug\../../firmatator_examples/include/firmatator/fdevice.h(18) : vea la definición anterior de 'qt_metacall'
    debug\moc_fdevice.cpp(139) : warning C4273: 'firmatator::FDevice::deviceReady' : vinculación de DLL incoherente
    ....\firmatator-master\build-firmatator_examples-desktop_qt_5_4_1_msvc2013_32bit-debug\debug\../../firmatator_examples/include/firmatator/fdevice.h(137) : vea la definición anterior de 'deviceReady'
    Attached Images Attached Images

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

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

    That looks like if the library is not fully built.

    The moc file should have been compiled and the result linked into the library.

    But for all we know this firmatator thing could be horribly broken as-is.

    Cheers,
    _

Similar Threads

  1. QT dynamic build "qwindows" identification problem
    By uzairsaeed702 in forum Installation and Deployment
    Replies: 2
    Last Post: 16th December 2014, 20:07
  2. "This file was generated using the moc from 5.1.0 ... The moc has changed too much
    By TheIndependentAquarius in forum Installation and Deployment
    Replies: 2
    Last Post: 15th January 2014, 12:39
  3. Replies: 4
    Last Post: 18th April 2010, 00:37
  4. Replies: 3
    Last Post: 15th February 2010, 17:27
  5. Replies: 3
    Last Post: 8th July 2008, 19:37

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.