'strtoll' 和许多其他人“不是 'std' 的成员"; [英] 'strtoll' and many others "not a member of 'std'"

查看:49
本文介绍了'strtoll' 和许多其他人“不是 'std' 的成员";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

strtoull,strtof,strtold,vsnprintf,wcstoll,wcstoullwcstofwcstold 不是std"的成员.问题是我不使用任何这些功能.我什至不知道它们的存在.它们在文件 basic_string.h 中,我也不知道我在使用它.我使用的是 VS2015,所以我假设我正在使用 VSC++ 14.0 编译器进行编译.

strtoull,strtof,strtold,vsnprintf,wcstoll,wcstoull,wcstof, and wcstold are not members of 'std.' The problem is I don't use any of these functions. I didn't even know they existed. they are in file basic_string.h, which I also didn't know I was using. I'm using VS2015 so I assume I am compiling using the VSC++ 14.0 compiler.

我看到有十多个类似的问题,但我只能找到两个常见错误:未使用 C++11 标志和未使用 #includeing .我已经设置了 C++11 标志并且 #include 没有任何改变.这个问题让我不过很好奇.我认为 #include 的顺序无关紧要.我尝试了系统库 <> 第一方库和第三方库第二个",反之亦然,并没有观察到任何差异.

I see that there over a dozen similar questions but I can only find two common errors: not using the C++11 flag and not #includeing . I have had the C++11 flag set and #include <algorithm> changes nothing. this question makes me curious,though. I thought the order of #includes didn't matter. I tried system libraries <> first and 3rd party libraries second "" and also vice-versa and observed no difference.

我也试过 #include "stdafx.h" 作为其他一些答案指出的,但不存在这样的文件.

I also tried #include "stdafx.h" as some other answers indicated, but no such file exists.

不确定要在此处包含什么,因为我终于到了 IDE 未识别出我的代码中的任何错误的地步.同样,所有问题都在basic_string.h"中.这是我的 include:

not sure what to include here because I finally got to the point where the IDE identifies no errors in my code. again, all the issues are in "basic_string.h." here are my includes:

#include <iostrream>
#include <string>
#include <cstring>
#include <sstream>
#include <map>

#include "curl/curl.h"
#include "curl/easy.h"

这可能是我另一个问题的延续 在这里,我现在会更新.

this may be a continuation of my other question here, which I will update now.

edit 1:我已经包含了 ,我看不出有什么区别.我很好奇为什么我从未在我从未接触过的文件中使用过的函数会出现问题.

edit 1: I have included <cstdlib>,<cstdio>,and<cwchar> and I see no difference. I'm curious why it's having issues with functions I've never used in files I've never touched.

我完全忘记我昨天在 VS2015 上进行了修复,这是结果.我不确定这些是可选模块还是核心问题还是什么.Windows 软件开发工具包"听起来很重要,但我不是为 Windows 机器开发(尽管我是在 Win7 上开发的).

I totally forgot I ran a repair on VS2015 yesterday and here are the results. I'm not sure if these are optional modules or core issues or what. "Windows Software Development Kit" sounds important but I am not developing for a windows machine(though I am developing on Win7).

编辑 2:有人要求提供最少的可重现代码.这是整个文件,没有评论:

edit 2: someone asked for minimal reproducible code. here is the whole file sans comments:

#include <iostream>
#include <string>
#include <cstring>
#include <cstdlib>
#include <sstream>
#include <map>
#include <cstdio>
#include <cwchar>

int main(int argc, char *argv[])
{
return 0;
}

刚刚意识到我不需要所有包含的内容(因为我将所有功能代码都注释掉了)所以我现在将看看是哪个导致了问题.

just realized I don't need all the includes for nothing(because i commented all functional code out) so I will now see which one is causing the issue.

edit 3 : cstring,cstdlib,cstdio,cwchar,还有两个curl 标头是唯一不会导致此问题的标头.我可以一次包含所有六个,没有问题.在 OP 或之前的编辑中提到的任何其他 #include 都会导致相同的 ...is not a member of 'std' 错误.但是,在我开始遇到此问题之前,我认为我没有包含任何 <c...>.iostream,string,sstream,map 每个(个别甚至)导致这个问题.我们还在寻找完整的 VS2015 重新安装吗?

edit 3 : cstring,cstdlib,cstdio, cwchar, and the two curl headers are the only headers that will not cause this issue. I can include all six of them at once without issue. any other #include that was mentioned in the OP or the previous edit will cause the same ...is not a member of 'std'error. However, I don't think I had any of the <c...>included before I started having this issue.iostream,string,sstream,map each (individually even) cause this issue. are we still looking at a complete VS2015 reinstall?

编辑 4:正如一位用户所建议的,我尝试创建一个新项目,但是 这就是发生了.我真的希望我们不会走到这一步,因为我不确定你们能提供多少帮助.基本上,我们有一些我不明白的复杂构建设置.在这里工作的另一个人也不了解设置.一个知道的人正在休陪产假.我在一台机器上开发并在服务器上构建/调试.但是,我在浏览设置时看到了一个不同的图表,其中混合了第二个服务器,我不确定它是如何起作用的.之后,它被部署到不同的机器上.无论如何,我选择了与当前项目相同的选项,但我什至无法创建一个空白的选项.我不确定这次失败是因为这个复杂的系统还是因为我的 VS2015 搞砸了.无论哪种方式我都无法解决这个问题,所以我想我会在监视这个线程的同时修复 VS2015(它已经出现过一次问题),看看这个新的项目错误是否揭示了一些重要的东西.非常感谢到目前为止所有帮助过的人

edit 4: As one user suggested, I tried to make a new project but this is what happened. I was really hoping we wouldnt get to this point because I'm not sure how much you all will be able to help. Basically,we have some complicated build setup which I don't understand. The other guy who works here also does not understand the setup. The one person who knows is out on paternity leave. I'm developing on one machine and building/debugging on a server. However, I was poking around the settings and I saw a different diagram that has a second server in the mix and I'm not sure how that plays into it. After that, it is deployed to a different machine. Anyway I selected the same options as the current project but I can't even create a blank one. I'm not sure if this failure is because of this complicated system or because my VS2015 is messed up. Either way I can't fix this as it is so I think I will work on repairing VS2015 (which already had issues once) while monitoring this thread to see if this new project error reveals something important. thanks a lot to all who helped so far

编辑 5:我下周请假.直到 3 日,我才能为仍然关心的任何人提供任何更新.我要修复然后重新安装

edit 5: I'm taking next week off. I won't be able to give any updates till the 3rd for anybody who still cares. I'm going to repair and then reinstall

推荐答案

这是我在 VisualGDB 属性-->Makefile 设置中的包含目录 的问题.我正在为我得到的每个库添加一个新目录.我重新安装了 VS2015,但这没有任何作用,因为罪魁祸首是项目选项.我复制了默认* 包含目录,就是这样.

it was a problem with my Include directories in VisualGDB Properties-->Makefile settings. I was adding a new directory for each library I got. I reinstalled VS2015, but that did nothing because the culprit was a project option. I copied the default* include directories and that was it.

*我团队中的某个人为我提供了默认包含目录的列表

*someone on my team provided me with a list of the default include directories

这篇关于'strtoll' 和许多其他人“不是 'std' 的成员";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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