我有一个带有 .pro 文件的 QT6 项目,我想包含我在 StackOverflow 问题中看到的 CGAL 库,其中有人问了同样的问题,但在 Linux 中,我在 Windows 安装文件夹中找不到 libs 文件夹。
我从堆栈中找到的问题的链接是这样的:如何将 CGAL 包含到 QT Creator 中的 QT 项目中?
这是我的 .pro 文件,但正如你可以想象的,我没有 usr/include 文件夹,所以我不知道如何继续。
# TestCGAL.pro
CONFIG += c++17
# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
main.cpp \
mainwindow.cpp
HEADERS += \
mainwindow.h
INCLUDEPATH += C:/dev/CGAL-6.0/include\
LIBS += -L/usr/include/
LIBS += -lCGAL
LIBS += -lgmp
LIBS += -lmpfr // not really needed for me, but added since gmp had to be added too
QMAKE_CXXFLAGS += -frounding-math -O3
FORMS += \
mainwindow.ui
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target