VS2015 CUDA项目编译运行但是Intellisense找不到包含

时间:2017-06-03 06:31:08

标签: visual-studio opencv cuda intellisense

我正在运行VS2015社区并使用混合的OpenCV / CUDA代码。该项目应该按预期运行,但智能感知在包含标题下进行。当我右键单击时,它会出现此错误。 enter image description here

我已经尝试过的事情:

  1. 重启VS(至少十几次)。
  2. 删除项目文件夹中的.vs文件夹。
  3. 删除项目文件夹中的*.vc.db
  4. 查看Additional Include Directories
  5. 删除Additional Include Directories>编译失败>将它们添加回来>成功编译。
  6. 确保我在x64Debug。我正在使用OpenCV 3.2 x64
  7. 我已经提到的其他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

1 个答案:

答案 0 :(得分:1)

问题必须与项目中的CUDA构建设置有关。我通过将$(OPENCV_DIR)\includeAdditional Include Directories移到简单Include Directories来解决了问题。 Remove from here Add here