在 macOS 10.15 Catalina 上调试 OMNet++ [英] OMNet++ debugging on macOS 10.15 Catalina

查看:89
本文介绍了在 macOS 10.15 Catalina 上调试 OMNet++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 macOS 10.15.2 Catalina,我遵循了 macOS 安装指南.我完全按照安装指南进行操作,但仍然无法调试.

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?

非常感谢.亚瑟

$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$

$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$

当我尝试安装以安装 OMNet++ 6 pre 5 并执行 make 时,出现以下错误,似乎 OMNet++ 6 pre 5 也未针对 macOS Catalina 10.15 进行测试.

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

推荐答案

您是否也尝试过 OMNeT++ 6 pre 5?它包含一个 lldbmi 包装器可执行文件,它将使用系统提供的 lldb 而不是 gdb,这可能会修复许多潜在问题(并可能导致其他问题).但值得一试.

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.

即使您在 macOS 上正确签署了 gdb,它也不支持动态加载,因此它或多或少是无用的(除非您静态构建所有内容).

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).

这篇关于在 macOS 10.15 Catalina 上调试 OMNet++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆