问题
I am using macOS 10.15.2 Catalina and I followed the Installation Guide for macOS. I completely followed the Installation Guide and still I am unable to debug.
Anyone encountered the same? or know how to fix it?
Many thanks. Yasir
$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$
Adding more details below for @Rudi
When I try to install to install OMNet++ 6 pre 5 and do make
, I am getting following error and it seems that OMNet++ 6 pre 5 is also not tested for macOS Catalina 10.15.
===== Compiling qtenv ====
messageanimator.cc
In file included from messageanimator.cc:17:
In file included from ./messageanimator.h:26:
In file included from /Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/QGraphicsRectItem:1:
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:80:1: error: expected expression
public:
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:24: error: variable has incomplete type 'class Q_WIDGETS_EXPORT'
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:7: note: forward declaration of 'Q_WIDGETS_EXPORT'
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:484:31: error: 'QGraphicsItem' is not a class, namespace, or enumeration
Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsItem::GraphicsItemFlags)
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:24: note: 'QGraphicsItem' declared here
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:484:31: error: 'QGraphicsItem' is not a class, namespace, or enumeration
Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsItem::GraphicsItemFlags)
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:24: note: 'QGraphicsItem' declared here
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:484:31: error: 'QGraphicsItem' is not a class, namespace, or enumeration
Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsItem::GraphicsItemFlags)
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:24: note: 'QGraphicsItem' declared here
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:484:31: error: 'QGraphicsItem' is not a class, namespace, or enumeration
Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsItem::GraphicsItemFlags)
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:24: note: 'QGraphicsItem' declared here
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:484:31: error: 'QGraphicsItem' is not a class, namespace, or enumeration
Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsItem::GraphicsItemFlags)
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:24: note: 'QGraphicsItem' declared here
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:484:31: error: 'QGraphicsItem' is not a class, namespace, or enumeration
Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsItem::GraphicsItemFlags)
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:24: note: 'QGraphicsItem' declared here
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:484:31: error: 'QGraphicsItem' is not a class, namespace, or enumeration
Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsItem::GraphicsItemFlags)
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:24: note: 'QGraphicsItem' declared here
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:484:31: error: 'QGraphicsItem' is not a class, namespace, or enumeration
Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsItem::GraphicsItemFlags)
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:24: note: 'QGraphicsItem' declared here
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:485:1: error: expected expression
Q_DECLARE_INTERFACE(QGraphicsItem, "org.qt-project.Qt.QGraphicsItem")
^
/usr/local/include/QtCore/qobject.h:529:65: note: expanded from macro 'Q_DECLARE_INTERFACE'
template <> inline const char *qobject_interface_iid<IFace *>() \
^
In file included from messageanimator.cc:17:
In file included from ./messageanimator.h:26:
In file included from /Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/QGraphicsRectItem:1:
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:485:1: error: expected unqualified-id
/usr/local/include/QtCore/qobject.h:529:67: note: expanded from macro 'Q_DECLARE_INTERFACE'
template <> inline const char *qobject_interface_iid<IFace *>() \
^
In file included from messageanimator.cc:17:
In file included from ./messageanimator.h:26:
In file included from /Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/QGraphicsRectItem:1:
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:595:24: error: variable has incomplete type 'class Q_WIDGETS_EXPORT'
class Q_WIDGETS_EXPORT QAbstractGraphicsShapeItem : public QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:7: note: forward declaration of 'Q_WIDGETS_EXPORT'
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:595:51: error: expected ';' after top level declarator
class Q_WIDGETS_EXPORT QAbstractGraphicsShapeItem : public QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:595:53: error: expected unqualified-id
class Q_WIDGETS_EXPORT QAbstractGraphicsShapeItem : public QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:620:24: error: variable has incomplete type 'class Q_WIDGETS_EXPORT'
class Q_WIDGETS_EXPORT QGraphicsPathItem : public QAbstractGraphicsShapeItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:7: note: forward declaration of 'Q_WIDGETS_EXPORT'
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:620:42: error: expected ';' after top level declarator
class Q_WIDGETS_EXPORT QGraphicsPathItem : public QAbstractGraphicsShapeItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:620:44: error: expected unqualified-id
class Q_WIDGETS_EXPORT QGraphicsPathItem : public QAbstractGraphicsShapeItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:653:24: error: variable has incomplete type 'class Q_WIDGETS_EXPORT'
class Q_WIDGETS_EXPORT QGraphicsRectItem : public QAbstractGraphicsShapeItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:7: note: forward declaration of 'Q_WIDGETS_EXPORT'
class Q_WIDGETS_EXPORT QGraphicsItem
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [Makefile:83: /Users/yasir/omnetpp-6.0pre5/out/clang-release/src/qtenv/messageanimator.o] Error 1
make[1]: *** [Makefile:121: qtenv] Error 2
make: *** [Makefile:35: allmodes] Error 2
回答1:
Have you tried also OMNeT++ 6 pre 5? It contains an lldbmi wrapper executable that would use system provided lldb instead of gdb which may fix a lot of potential problems (and may cause other ones). But it would worth a try.
Even if you get gdb signed properly on macOS it will not support dynamic loading so it would be more or less useless (unless you build everything statically).
来源:https://stackoverflow.com/questions/59394876/omnet-debugging-on-macos-10-15-catalina