首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >如何在.pro文件中使用空格和尖括号作为目标

如何在.pro文件中使用空格和尖括号作为目标
EN

Stack Overflow用户
提问于 2018-07-22 11:18:09
回答 1查看 127关注 0票数 0

我想将我的Qt应用程序命名为

测试<2>

所以我把我的.pro文件写成

代码语言:javascript
复制
TEMPLATE = app
TARGET = test\\\ \\\<2\\\>

QT = core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

SOURCES +=  main.cpp

但它在构建时失败:

代码语言:javascript
复制
11:14:31: Running steps for project asdf...
11:14:31: Configuration unchanged, skipping qmake step.
11:14:31: Starting: "/usr/bin/make" 
/home/erik/Qt/5.11.1/gcc_64/bin/qmake -o Makefile ../asdf/asdf.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug
WARNING: DESTDIR: Cannot access directory '../build-asdf-Desktop_Qt_5_11_1_GCC_64bit-Debug/test/ /<2'
/bin/sh: 1: cannot open 2/: No such file
/bin/sh: 1: cannot open 2/: No such file
Makefile:254: recipe for target 'test/ //<2/>' failed
make: *** [test/ //<2/>] Error 2
11:14:31: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project asdf (kit: Desktop Qt 5.11.1 GCC 64bit)
When executing step "Make"
11:14:31: Elapsed time: 00:00.

我应该如何转义TARGET中的字符?

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51461739

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档