CGAL_USE_BASIC_VIEWER

Я пытаюсь запустить libqglviewer пример множественного выбора с файлом .off, но он показывает следующую проблему: Невозможно рисовать, потому что CGAL_USE_BASIC_VIEWER не определен.

Поэтому я добавил QMAKE_CXXFLAGS +=-DCGAL_USE_BASIC_VIEWER в файл .pro он решает существующую проблему, но показывает много ошибок, связанных с Basic_viewer_qt.h

/usr/include/CGAL/Qt/Basic_viewer_qt.h:146:1: error: expected class-name before ‘{’ token
 {
 ^
/usr/include/CGAL/Qt/Basic_viewer_qt.h:552:29: error: ‘CGAL::QGLViewer’ has not been declared
   void attrib_buffers(CGAL::QGLViewer* viewer)
                             ^~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h: In constructor ‘CGAL::Basic_viewer_qt::Basic_viewer_qt(QWidget*, const char*, bool, bool, bool, bool, bool)’:
/usr/include/CGAL/Qt/Basic_viewer_qt.h:160:20: error: expected class-name before ‘(’ token
     CGAL::QGLViewer(parent),
                    ^
/usr/include/CGAL/Qt/Basic_viewer_qt.h:160:20: error: expected ‘{’ before ‘(’ token
/usr/include/CGAL/Qt/Basic_viewer_qt.h: In member function ‘void CGAL::Basic_viewer_qt::attrib_buffers(int*)’:
/usr/include/CGAL/Qt/Basic_viewer_qt.h:557:13: error: request for member ‘camera’ in ‘* viewer’, which is of non-class type ‘int’
     viewer->camera()->getModelViewProjectionMatrix(mat);
             ^~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:562:13: error: request for member ‘camera’ in ‘* viewer’, which is of non-class type ‘int’
     viewer->camera()->getModelViewMatrix(mat);
             ^~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h: In member function ‘virtual void CGAL::Basic_viewer_qt::draw()’:
/usr/include/CGAL/Qt/Basic_viewer_qt.h:624:24: error: no matching function for call to ‘CGAL::Basic_viewer_qt::attrib_buffers(CGAL::Basic_viewer_qt*)’
     attrib_buffers(this);
                        ^
/usr/include/CGAL/Qt/Basic_viewer_qt.h:552:8: note: candidate: ‘void CGAL::Basic_viewer_qt::attrib_buffers(int*)’
   void attrib_buffers(CGAL::QGLViewer* viewer)
        ^~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:552:8: note:   no known conversion for argument 1 from ‘CGAL::Basic_viewer_qt*’ to ‘int*’
/usr/include/CGAL/Qt/Basic_viewer_qt.h: In member function ‘virtual void CGAL::Basic_viewer_qt::redraw()’:
/usr/include/CGAL/Qt/Basic_viewer_qt.h:727:5: error: ‘update’ was not declared in this scope
     update();
     ^~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:727:5: note: suggested alternative: ‘QDate’
     update();
     ^~~~~~
     QDate
/usr/include/CGAL/Qt/Basic_viewer_qt.h: In member function ‘virtual void CGAL::Basic_viewer_qt::init()’:
/usr/include/CGAL/Qt/Basic_viewer_qt.h:733:5: error: ‘restoreStateFromFile’ was not declared in this scope
     restoreStateFromFile();
     ^~~~~~~~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:734:5: error: ‘initializeOpenGLFunctions’ was not declared in this scope
     initializeOpenGLFunctions();
     ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:734:5: note: suggested alternative: ‘QAbstractOpenGLFunctions’
     initializeOpenGLFunctions();
     ^~~~~~~~~~~~~~~~~~~~~~~~~
     QAbstractOpenGLFunctions
/usr/include/CGAL/Qt/Basic_viewer_qt.h:737:28: error: ‘EXIT_VIEWER’ is not a member of ‘qglviewer’
     setShortcut(qglviewer::EXIT_VIEWER, ::Qt::CTRL+::Qt::Key_Q);
                            ^~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:737:5: error: ‘setShortcut’ was not declared in this scope
     setShortcut(qglviewer::EXIT_VIEWER, ::Qt::CTRL+::Qt::Key_Q);
     ^~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:737:5: note: suggested alternative: ‘QShortcut’
     setShortcut(qglviewer::EXIT_VIEWER, ::Qt::CTRL+::Qt::Key_Q);
     ^~~~~~~~~~~
     QShortcut
/usr/include/CGAL/Qt/Basic_viewer_qt.h:740:5: error: ‘setKeyDescription’ was not declared in this scope
     setKeyDescription(::Qt::Key_E, "Toggles edges display");
     ^~~~~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:774:11: error: ‘class CGAL::Basic_viewer_qt’ has no member named ‘camera’
     this->camera()->setSceneBoundingBox(CGAL::qglviewer::Vec(bb.xmin(),
           ^~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:774:47: error: ‘CGAL::qglviewer’ has not been declared
     this->camera()->setSceneBoundingBox(CGAL::qglviewer::Vec(bb.xmin(),
                                               ^~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:777:47: error: ‘CGAL::qglviewer’ has not been declared
                                         CGAL::qglviewer::Vec(bb.xmax(),
                                               ^~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:781:11: error: ‘class CGAL::Basic_viewer_qt’ has no member named ‘showEntireScene’
     this->showEntireScene();
           ^~~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h: In member function ‘virtual void CGAL::Basic_viewer_qt::keyPressEvent(QKeyEvent*)’:
/usr/include/CGAL/Qt/Basic_viewer_qt.h:800:7: error: ‘displayMessage’ was not declared in this scope
       displayMessage(QString("Draw edges=%1.").arg(m_draw_edges?"true":"false"));
       ^~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:801:7: error: ‘update’ was not declared in this scope
       update();
       ^~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:801:7: note: suggested alternative: ‘QDate’
       update();
       ^~~~~~
       QDate
/usr/include/CGAL/Qt/Basic_viewer_qt.h:806:7: error: ‘displayMessage’ was not declared in this scope
       displayMessage(QString("Draw faces=%1.").arg(m_draw_faces?"true":"false"));
       ^~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:807:7: error: ‘update’ was not declared in this scope
       update();
       ^~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:807:7: note: suggested alternative: ‘QDate’
       update();
       ^~~~~~
       QDate
/usr/include/CGAL/Qt/Basic_viewer_qt.h:813:9: error: ‘displayMessage’ was not declared in this scope
         displayMessage("Flat shading.");
         ^~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:815:9: error: ‘displayMessage’ was not declared in this scope
         displayMessage("Gouraud shading.");
         ^~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:821:7: error: ‘displayMessage’ was not declared in this scope
       displayMessage(QString("Mono color=%1.").arg(m_use_mono_color?"true":"false"));
       ^~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:822:7: error: ‘update’ was not declared in this scope
       update();
       ^~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:822:7: note: suggested alternative: ‘QDate’
       update();
       ^~~~~~
       QDate
/usr/include/CGAL/Qt/Basic_viewer_qt.h:827:7: error: ‘displayMessage’ was not declared in this scope
       displayMessage(QString("Inverse normal=%1.").arg(m_inverse_normal?"true":"false"));
       ^~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:834:7: error: ‘displayMessage’ was not declared in this scope
       displayMessage(QString("Draw vertices=%1.").arg(m_draw_vertices?"true":"false"));
       ^~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:835:7: error: ‘update’ was not declared in this scope
       update();
       ^~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:835:7: note: suggested alternative: ‘QDate’
       update();
       ^~~~~~
       QDate
/usr/include/CGAL/Qt/Basic_viewer_qt.h:840:7: error: ‘displayMessage’ was not declared in this scope
       displayMessage(QString("Size of edges=%1.").arg(m_size_edges));
       ^~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:841:7: error: ‘update’ was not declared in this scope
       update();
       ^~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:841:7: note: suggested alternative: ‘QDate’
       update();
       ^~~~~~
       QDate
/usr/include/CGAL/Qt/Basic_viewer_qt.h:846:7: error: ‘displayMessage’ was not declared in this scope
       displayMessage(QString("Size of edges=%1.").arg(m_size_edges));
       ^~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:847:7: error: ‘update’ was not declared in this scope
       update();
       ^~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:847:7: note: suggested alternative: ‘QDate’
       update();
       ^~~~~~
       QDate
/usr/include/CGAL/Qt/Basic_viewer_qt.h:852:7: error: ‘displayMessage’ was not declared in this scope
       displayMessage(QString("Size of points=%1.").arg(m_size_points));
       ^~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:853:7: error: ‘update’ was not declared in this scope
       update();
       ^~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:853:7: note: suggested alternative: ‘QDate’
       update();
       ^~~~~~
       QDate
/usr/include/CGAL/Qt/Basic_viewer_qt.h:858:7: error: ‘displayMessage’ was not declared in this scope
       displayMessage(QString("Size of points=%1.").arg(m_size_points));
       ^~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:859:7: error: ‘update’ was not declared in this scope
       update();
       ^~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:859:7: note: suggested alternative: ‘QDate’
       update();
       ^~~~~~
       QDate
/usr/include/CGAL/Qt/Basic_viewer_qt.h:869:7: error: ‘displayMessage’ was not declared in this scope
       displayMessage(QString("Light color=(%1 %2 %3).").
       ^~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:871:7: error: ‘update’ was not declared in this scope
       update();
       ^~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:871:7: note: suggested alternative: ‘QDate’
       update();
       ^~~~~~
       QDate
/usr/include/CGAL/Qt/Basic_viewer_qt.h:881:7: error: ‘displayMessage’ was not declared in this scope
       displayMessage(QString("Light color=(%1 %2 %3).").
       ^~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:883:7: error: ‘update’ was not declared in this scope
       update();
       ^~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:883:7: note: suggested alternative: ‘QDate’
       update();
       ^~~~~~
       QDate
/usr/include/CGAL/Qt/Basic_viewer_qt.h:889:7: error: ‘displayMessage’ was not declared in this scope
       displayMessage(QString("Light color=(%1 %2 %3).").
       ^~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:891:7: error: ‘update’ was not declared in this scope
       update();
       ^~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:891:7: note: suggested alternative: ‘QDate’
       update();
       ^~~~~~
       QDate
/usr/include/CGAL/Qt/Basic_viewer_qt.h:897:7: error: ‘displayMessage’ was not declared in this scope
       displayMessage(QString("Light color=(%1 %2 %3).").
       ^~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:899:7: error: ‘update’ was not declared in this scope
       update();
       ^~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:899:7: note: suggested alternative: ‘QDate’
       update();
       ^~~~~~
       QDate
/usr/include/CGAL/Qt/Basic_viewer_qt.h:905:7: error: ‘displayMessage’ was not declared in this scope
       displayMessage(QString("Light color=(%1 %2 %3).").
       ^~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:907:7: error: ‘update’ was not declared in this scope
       update();
       ^~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:907:7: note: suggested alternative: ‘QDate’
       update();
       ^~~~~~
       QDate
/usr/include/CGAL/Qt/Basic_viewer_qt.h:913:7: error: ‘displayMessage’ was not declared in this scope
       displayMessage(QString("Light color=(%1 %2 %3).").
       ^~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:915:7: error: ‘update’ was not declared in this scope
       update();
       ^~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:915:7: note: suggested alternative: ‘QDate’
       update();
       ^~~~~~
       QDate
/usr/include/CGAL/Qt/Basic_viewer_qt.h:921:7: error: ‘displayMessage’ was not declared in this scope
       displayMessage(QString("Light color=(%1 %2 %3).").
       ^~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:923:7: error: ‘update’ was not declared in this scope
       update();
       ^~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:923:7: note: suggested alternative: ‘QDate’
       update();
       ^~~~~~
       QDate
/usr/include/CGAL/Qt/Basic_viewer_qt.h:929:7: error: ‘displayMessage’ was not declared in this scope
       displayMessage(QString("Light color=(%1 %2 %3).").
       ^~~~~~~~~~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:931:7: error: ‘update’ was not declared in this scope
       update();
       ^~~~~~
/usr/include/CGAL/Qt/Basic_viewer_qt.h:931:7: note: suggested alternative: ‘QDate’
       update();
       ^~~~~~
       QDate
/usr/include/CGAL/Qt/Basic_viewer_qt.h:934:13: error: ‘CGAL::QGLViewer’ has not been declared
       CGAL::QGLViewer::keyPressEvent(e);

.про файл:

QT += xml quick gui opengl
CONFIG += c++11

DEFINES += QT_DEPRECATED_WARNINGS

 QMAKE_CXXFLAGS +=-DCGAL_USE_BASIC_VIEWER

SOURCES += \
        main.cpp \
    multiselect.cpp \
    manipulatedframesetconstraint.cpp \
    object.cpp

RESOURCES +=

HEADERS += \
    multiselect.h \
    manipulatedframesetconstraint.h \
    object.h

unix:!macx: LIBS += -L$$PWD/../../../../lib64/ -lQGLViewer-qt5

INCLUDEPATH += $$PWD/../../../../lib64
DEPENDPATH += $$PWD/../../../../lib64

unix:!macx: LIBS += -L$$PWD/../../../../lib64/ -lQt5OpenGL

INCLUDEPATH += $$PWD/../../../../lib64
DEPENDPATH += $$PWD/../../../../lib64

unix:!macx: LIBS += -L$$PWD/../../../../lib64/ -lGLU

INCLUDEPATH += $$PWD/../../../../lib64
DEPENDPATH += $$PWD/../../../../lib64

unix:!macx: LIBS += -L$$PWD/../../../../lib64/ -lCGAL

INCLUDEPATH += $$PWD/../../../../lib64
DEPENDPATH += $$PWD/../../../../lib64

unix:!macx: LIBS += -L$$PWD/../../../../lib64/ -lCGAL_Core

INCLUDEPATH += $$PWD/../../../../lib64
DEPENDPATH += $$PWD/../../../../lib64


unix:!macx: LIBS += -L$$PWD/../../../../lib64/ -lgmp

INCLUDEPATH += $$PWD/../../../../lib64
DEPENDPATH += $$PWD/../../../../lib64




unix:!macx: LIBS += -L$$PWD/../../../../lib64/ -lCGAL_ImageIO

INCLUDEPATH += $$PWD/../../../../lib64
DEPENDPATH += $$PWD/../../../../lib64



unix:!macx: LIBS += -L$$PWD/../../../../usr/lib64/ -lQGLViewer-qt5

INCLUDEPATH += $$PWD/../../../../usr/lib64
DEPENDPATH += $$PWD/../../../../usr/lib64


unix:!macx: LIBS += -L$$PWD/../../../../usr/lib64/ -lCGAL_Qt5

INCLUDEPATH += $$PWD/../../../../usr/lib64
DEPENDPATH += $$PWD/../../../../usr/lib64

любая помощь? пожалуйста

Этот пост может быть полезен. stackoverflow.com/questions/53150670/…

frogatto 22.07.2019 10:23

Вы должны создать файл Минимальный воспроизводимый пример.

lrineau 23.07.2019 14:52
Стоит ли изучать PHP в 2026-2027 годах?
Стоит ли изучать PHP в 2026-2027 годах?
Привет всем, сегодня я хочу высказать свои соображения по поводу вопроса, который я уже много раз получал в своем сообществе: "Стоит ли изучать PHP в...
Поведение ключевого слова "this" в стрелочной функции в сравнении с нормальной функцией
Поведение ключевого слова "this" в стрелочной функции в сравнении с нормальной функцией
В JavaScript одним из самых запутанных понятий является поведение ключевого слова "this" в стрелочной и обычной функциях.
Приемы CSS-макетирования - floats и Flexbox
Приемы CSS-макетирования - floats и Flexbox
Здравствуйте, друзья-студенты! Готовы совершенствовать свои навыки веб-дизайна? Сегодня в нашем путешествии мы рассмотрим приемы CSS-верстки - в...
Тестирование функциональных ngrx-эффектов в Angular 16 с помощью Jest
В системе управления состояниями ngrx, совместимой с Angular 16, появились функциональные эффекты. Это здорово и делает код определенно легче для...
Концепция локализации и ее применение в приложениях React ⚡️
Концепция локализации и ее применение в приложениях React ⚡️
Локализация - это процесс адаптации приложения к различным языкам и культурным требованиям. Это позволяет пользователям получить опыт, соответствующий...
Пользовательский скаляр GraphQL
Пользовательский скаляр GraphQL
Листовые узлы системы типов GraphQL называются скалярами. Достигнув скалярного типа, невозможно спуститься дальше по иерархии типов. Скалярный тип...
0
2
429
1
Перейти к ответу Данный вопрос помечен как решенный

Ответы 1

Ответ принят как подходящий

Вы используете не тот QGLVIewer. CGAL_USE_BASIC_VIEWER требуется только в CGAL-реализации libQGLViewer, который предполагается использовать только в графическом материале CGAL. Проверяйте пути и избегайте тех, которые содержат CGAL.

Другие вопросы по теме