小编Pau*_*que的帖子

XCode with boost"Semantic Issue - undeclared identifier va_start"

C++locale.h
->Semantic Issue
-->Use of undeclared identifier 'va_start'
->Semantic Issue
-->Use of undeclared identifier 'va_end'
Run Code Online (Sandbox Code Playgroud)

首次使用boost,使用ports下载并在XCode中创建了一个命令行项目.标题搜索路径:/ usr/include/**

代码中没有任何内容,只是默认项目附带的主要功能.

只是不知道该怎么做,从未预料到会发生这种情况.

EDIT1:

第一次出现:

#ifndef _GLIBCXX_CSTDARG
#define _GLIBCXX_CSTDARG 1

#pragma GCC system_header

#include <bits/c++config.h>
#include <stdarg.h>

// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998
#ifndef va_end
#define va_end(ap) va_end (ap)
#endif

_GLIBCXX_BEGIN_NAMESPACE(std)

  using ::va_list;

_GLIBCXX_END_NAMESPACE

#endif
Run Code Online (Sandbox Code Playgroud)

它是\ usr\include\c ++\4.2.1中没有扩展名的文件,我刚刚意识到这个文件与boost无关,这里有一些令人讨厌的事情发生.

EDIT2:将include目录修复到/ opt/local/include/**后出现新错误:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/c++/v1/type_traits:214:46:
Use of undeclared identifier 'nullptr_t'; did you mean 'nullptr'?
Run Code Online (Sandbox Code Playgroud)

还有其他错误,都与文件夹sr/lib/c ++/v1中的这些文件有关/为什么?这些文件似乎是一些核心功能,它们无法破解.

这是错误的图片,也许你们看到的东西 错误

编辑3:将编译器从Apple LLVM更改为GCC LLVM将错误减少到只有一个:"vspintf不是c ++ locale.h中'std'的成员".好的,现在我完全迷失了.

c++ macos xcode boost

11
推荐指数
2
解决办法
1万
查看次数

标签 统计

boost ×1

c++ ×1

macos ×1

xcode ×1