Menu

Ubuntu 12.04

Help
2012-04-30
2013-04-06
  • Yordanis Gómez Finalé

    Hello everyone,
    I got this error compiling on Ubuntu 12.04:

    moc_PythonQtStdDecorators.cpp: In static member function ‘static void PythonQtStdDecorators::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)’:
    moc_PythonQtStdDecorators.cpp:152:25: error: expected unqualified-id before ‘(’ token
    moc_PythonQtStdDecorators.cpp:153:25: error: expected unqualified-id before ‘(’ token
    moc_PythonQtStdDecorators.cpp:154:25: error: expected unqualified-id before ‘(’ token
    moc_PythonQtStdDecorators.cpp:155:25: error: expected unqualified-id before ‘(’ token
    moc_PythonQtStdDecorators.cpp:156:25: error: expected unqualified-id before ‘(’ token
    moc_PythonQtStdDecorators.cpp:157:25: error: expected unqualified-id before ‘(’ token
    moc_PythonQtStdDecorators.cpp:158:26: error: expected unqualified-id before ‘(’ token
    moc_PythonQtStdDecorators.cpp:159:26: error: expected unqualified-id before ‘(’ token
    make: ***  Error 1

    Any hints ?
    Thanks in adance !

     
  • Chris Bevan

    Chris Bevan - 2012-05-01

    Hi,

    Could you post the relevant parts of that file - i.e. the qt_static_metacall function, where those errors are coming up?

    - Chris

     
  • Paul Nader

    Paul Nader - 2012-05-17

    Hi,

    I got the same errors when compiling with Qt 4.8.1 and Python 2.7.2+. Here is the code you asked for (line 152)

            case 4: _t->emit((*reinterpret_cast< QObject*(*)>(_a[1])),(*reinterpret_cast< const QByteArray(*)>(_a[2])),(*reinterpret_cast< PyObject*(*)>(_a[3])),(*reinterpret_cast< PyObject*(*)>(_a[4])),(*reinterpret_cast< PyObject*(*)>(_a[5])),(*reinterpret_cast< PyObject*(*)>(_a[6])),(*reinterpret_cast< PyObject*(*)>(_a[7])),(*reinterpret_cast< PyObject*(*)>(_a[8])),(*reinterpret_cast< PyObject*(*)>(_a[9]))); break;
    
     
  • Chris Bevan

    Chris Bevan - 2012-05-18

    Hmmm…  My compilation platform is currently fixed on Ubuntu 10.04, Qt 4.5 and 4.7, and Python 2.6.5, and I can't switch at present - but I can take a guess.

    The error is located at the end of the word "emit", and the error "expected unqualified-id before ‘(’ token" seems to be indicating that the word "emit" has been removed.  This is what Qt does in standard non-MOC compilation - e.g. "emit mySignal()" is just converted to "mySignal()" in standard code that isn't in MOC files.  It sounds like those MOC files are being compiled with incorrect flags for some reason or other.

    From a quick look, the "emit" definition is set up in qobjectdefs.h (in Qt 4.7, anyway).  It seems that either Q_MOC_RUN should be defined, or QT_NO_EMIT should.

    Hopefully that'll give you a good start at tracking it down.  It vaguely rings a bell for me, but if I ever have seen it myself, I can't remember any more details, sorry.

    Cheers,
    - Chris

     
  • Florian Link

    Florian Link - 2012-05-18

    Please try to compile with the current svn trunk version of PythonQt, I recently updated the trunk to the current PythonQt version and removed the "emit" slot from the std decorators. I guess the emit slot is the culprit for your problem.

    There are various improvements and bug fixes on the trunk.
    I guess I will release a PythonQt 2.1 version together with the next MeVisLab release next month.

     
  • Paul Nader

    Paul Nader - 2012-05-18

    Hi,

    Thanks Chris & Florian.

    Yesterday I found this post by the QuteCsound users group which also stated trunk would compile against 4.8.1 so I checked it out and it compiled fine.

    I also found this bug report in debian which had a patch for the emit issue, but I never gave it a go as I'm happy to use trunk.

    Thanks again.

    Paul

     
  • Yordanis Gómez Finalé

    Nice Job !!!
    Thank you very much.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.