gpt4 book ai didi

c++ - Qt : how to include path with space in pro

转载 作者:行者123 更新时间:2023-12-03 06:55:13 24 4
gpt4 key购买 nike

平台:Windows 10Qt 版本:5.15.1例如,我想包含此路径 C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt在 pro 文件中。
以下是我尝试过的方法:

  • 使用 $$quote() :
    INCLUDEPATH += $$quote(C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt)
  • 使用 " " :
    INCLUDEPATH += "C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt"
  • 使用 $$quote" "一起:
    INCLUDEPATH += $$quote("C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt")
  • \\/ :
    INCLUDEPATH += $$quote("C:/Program Files (x86)/Windows Kits/10/Include/10.0.18362.0/ucrt")

  • 一切都不好,这是我不断收到的错误:
    Qt Creator error

    最佳答案

    您需要用""报价并使用不带 $$quote 的正斜杠

    To specify a path containing spaces, quote the path using the technique described in Whitespace.

    win32:INCLUDEPATH += "C:/mylibs/extra headers"
    unix:INCLUDEPATH += "/home/user/extra headers"

    INCLUDEPATH

    关于c++ - Qt : how to include path with space in pro,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64218544/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com