Qt使用通配符'*'添加源

时间:2018-10-28 12:38:34

标签: c++ qt build qt-creator wildcard

我这样在qtcreator中的.pro文件中添加了源文件和头文件

SOURCES += \
    main.cpp \
    mainwindow.cpp \
    components/layouts/*.cpp \
    components/lib/*.cpp \
    components/*.cpp

HEADERS += \
    mainwindow.h \
    components/layouts/*.h" \
    components/lib/*.h" \
    components/*.h

当我尝试构建时,出现此错误

:-1: error: No rule to make target 'components/*.cpp', needed by 'main.o'. Stop.

0 个答案:

没有答案