【问题标题】:VS2015 CUDA project compiles and runs but Intellisense cannot find includesVS2015 CUDA项目编译运行但Intellisense找不到包含
【发布时间】:2017-11-04 13:56:59
【问题描述】:

我正在运行 VS2015 社区并使用混合的 OpenCV/CUDA 代码。该项目按应有的方式运行,但 Intellisense 会在包含标头下显示曲线。当我右键单击时,它会出现此错误。

我已经尝试过的事情:

  1. 重启 VS(至少十几次)。
  2. 删除项目文件夹中的.vs文件夹。
  3. 删除项目文件夹中的*.vc.db
  4. 检查Additional Include Directories
  5. 删除Additional Include Directories > 编译失败 > 重新添加 > 编译成功。
  6. 确保我在x64Debug 上。我正在使用OpenCV 3.2 x64

我已经提到的其他 stackoverflow 问题没有成功

  1. why visual studio editor can not find a header file, when compiler can find it
  2. Visual Studio 2008 oddity with C++ and header files
  3. Visual Studio can't 'see' my included header files
  4. How to rebuild VS2010 IDE Intellisense?
  5. Visual Studio 2015: Intellisense errors but solution compiles
  6. 'Additional include directories' in visual studio 2010 doesn't work
  7. Visual Studio 2010 intellisense not recognising additional include directory
  8. Visual Studio 2012 - Intellisense sometimes disappearing / broken
  9. Visual Studio C# IntelliSense not automatically displaying

【问题讨论】:

    标签: visual-studio opencv cuda intellisense


    【解决方案1】:

    问题与项目中的 CUDA 构建设置有关。我通过将$(OPENCV_DIR)\includeAdditional Include Directories 移动到简单的Include Directories 解决了这个问题。

    【讨论】:

    • 问题是,如果您使用的是纯 OpenCV 项目并且只是链接库(而不自己编写任何 CUDA 代码),您甚至不需要在VS.
    • 是的,如果我不编写任何 CUDA 代码,我不需要设置 CUDA 项目。我不明白你的意思。
    • 那么为什么要使用 CUDA 项目来编译似乎只使用 OpenCV 的东西?
    • 我正在使用 OpenCV 从磁盘读取和写入图像。 CUDA 用于图像处理。
    • 您在任何时候、任何地方都没有在您的问题或答案中提到这一点
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-05-11
    • 1970-01-01
    • 1970-01-01
    • 2016-07-15
    • 2022-01-16
    • 1970-01-01
    • 2013-06-10
    相关资源
    最近更新 更多