视觉工作室无法找到assert.h [英] visual studio unable to find assert.h

查看:44
本文介绍了视觉工作室无法找到assert.h的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是大学的第一年,我刚买了我的新笔记本电脑.我下载了 Visual Studio 2017 并提取了我的解决方案存储库.但是,我遇到了一些问题,因为在安装 VS 时似乎没有下载我以前计算机上的许多文件.我的大学 wifi 很慢,如果不需要,我不想重新下载.我按照之前的步骤在旧计算机上下载 VS 2017.然而,我收到如下错误:

I'm a first year at uni and I just got my new laptop. I downloaded Visual Studio 2017 and pulled my solution repo. However, I'm having some issues because it appears that a lot of the files I had on my previous computer were not downloaded in the installation of VS. My university wifi is slow and I don't want to re-download if I don't have to. I followed the previous steps I took to download VS 2017 on my old computer. Yet, I'm getting errors like:

  • 无法打开源文件assert.h"
  • 无法打开源文件errno.h"
  • 无法打开源文件float.h"
  • 无法打开源文件corecrt.h"
  • 无法打开源文件stddef.h"
  • 无法打开源文件stdio.h"

(在 20 多个其他人中)

(among 20+ others)

如果我右键单击并选择错误行上的打开文档",我会收到消息:在当前源文件的目录或构建系统路径中找不到文件_______.h"

If I right-click and choose the "Open document" on the line with the error, I get the message: File '_______.h' not found in current source file's directory or in build system path

但是,如果我转到包含路径,我可以找到如下文件:

However, if I go to my include paths, I can find files like:

  • cassert.h
  • cerrno.h
  • ostream.h

但我听说的那些都没有丢失.

but none of the ones that I'm told are missing.

主要是,我想知道是否有包含这些文件的目录我只需要添加到包含目录中,或者我是否只需要承认失败并重新安装.

Mainly, I'm wondering if there is a directory with this files I just need to add to the include directory or whether I just need to admit defeat and reinstall.

感谢您的帮助,我欢迎编辑,因为我确定我把事情搞砸了.我是新手.

Thanks for the help, I welcome editing as I'm sure I've messed things up. I'm new to this.

干杯,

迦勒

推荐答案

使用 VS2017 我能够通过以下方式解决同样的问题:

Using VS2017 I was able to resolve this same issue by:

  1. 右键单击解决方案
  2. 选择重定向解决方案"
  3. 从 Windows SDK 版本下拉列表中选择一个 SDK
  4. 点击确定按钮

这篇关于视觉工作室无法找到assert.h的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆