- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我正在尝试编译我的“图形”引擎,但在包含 <string>
后遇到问题(Debian 测试 64 位)。
这是错误:
jarrett@jarrett-g74s:~/projects/icebreak/ice_engine$ scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o build/engine/gui/GUI.o -c -I"../lwis/src/engine" src/engine/gui/GUI.cpp
In file included from /usr/include/c++/4.7/bits/postypes.h:42:0,
from /usr/include/c++/4.7/bits/char_traits.h:42,
from /usr/include/c++/4.7/string:42,
from src/engine/gui/GUI.h:11,
from src/engine/gui/GUI.cpp:14:
/usr/include/c++/4.7/cwchar:66:11: error: ‘::mbstate_t’ has not been declared
/usr/include/c++/4.7/cwchar:141:11: error: ‘::wint_t’ has not been declared
/usr/include/c++/4.7/cwchar:143:11: error: ‘::btowc’ has not been declared
/usr/include/c++/4.7/cwchar:144:11: error: ‘::fgetwc’ has not been declared
/usr/include/c++/4.7/cwchar:145:11: error: ‘::fgetws’ has not been declared
/usr/include/c++/4.7/cwchar:146:11: error: ‘::fputwc’ has not been declared
/usr/include/c++/4.7/cwchar:147:11: error: ‘::fputws’ has not been declared
/usr/include/c++/4.7/cwchar:148:11: error: ‘::fwide’ has not been declared
/usr/include/c++/4.7/cwchar:149:11: error: ‘::fwprintf’ has not been declared
/usr/include/c++/4.7/cwchar:150:11: error: ‘::fwscanf’ has not been declared
/usr/include/c++/4.7/cwchar:151:11: error: ‘::getwc’ has not been declared
/usr/include/c++/4.7/cwchar:152:11: error: ‘::getwchar’ has not been declared
/usr/include/c++/4.7/cwchar:153:11: error: ‘::mbrlen’ has not been declared
/usr/include/c++/4.7/cwchar:154:11: error: ‘::mbrtowc’ has not been declared
/usr/include/c++/4.7/cwchar:155:11: error: ‘::mbsinit’ has not been declared
/usr/include/c++/4.7/cwchar:156:11: error: ‘::mbsrtowcs’ has not been declared
/usr/include/c++/4.7/cwchar:157:11: error: ‘::putwc’ has not been declared
/usr/include/c++/4.7/cwchar:158:11: error: ‘::putwchar’ has not been declared
/usr/include/c++/4.7/cwchar:160:11: error: ‘::swprintf’ has not been declared
/usr/include/c++/4.7/cwchar:162:11: error: ‘::swscanf’ has not been declared
/usr/include/c++/4.7/cwchar:163:11: error: ‘::ungetwc’ has not been declared
/usr/include/c++/4.7/cwchar:164:11: error: ‘::vfwprintf’ has not been declared
/usr/include/c++/4.7/cwchar:166:11: error: ‘::vfwscanf’ has not been declared
/usr/include/c++/4.7/cwchar:169:11: error: ‘::vswprintf’ has not been declared
/usr/include/c++/4.7/cwchar:172:11: error: ‘::vswscanf’ has not been declared
/usr/include/c++/4.7/cwchar:174:11: error: ‘::vwprintf’ has not been declared
/usr/include/c++/4.7/cwchar:176:11: error: ‘::vwscanf’ has not been declared
/usr/include/c++/4.7/cwchar:178:11: error: ‘::wcrtomb’ has not been declared
/usr/include/c++/4.7/cwchar:179:11: error: ‘::wcscat’ has not been declared
/usr/include/c++/4.7/cwchar:180:11: error: ‘::wcscmp’ has not been declared
/usr/include/c++/4.7/cwchar:181:11: error: ‘::wcscoll’ has not been declared
/usr/include/c++/4.7/cwchar:182:11: error: ‘::wcscpy’ has not been declared
/usr/include/c++/4.7/cwchar:183:11: error: ‘::wcscspn’ has not been declared
/usr/include/c++/4.7/cwchar:184:11: error: ‘::wcsftime’ has not been declared
/usr/include/c++/4.7/cwchar:185:11: error: ‘::wcslen’ has not been declared
/usr/include/c++/4.7/cwchar:186:11: error: ‘::wcsncat’ has not been declared
/usr/include/c++/4.7/cwchar:187:11: error: ‘::wcsncmp’ has not been declared
/usr/include/c++/4.7/cwchar:188:11: error: ‘::wcsncpy’ has not been declared
/usr/include/c++/4.7/cwchar:189:11: error: ‘::wcsrtombs’ has not been declared
/usr/include/c++/4.7/cwchar:190:11: error: ‘::wcsspn’ has not been declared
/usr/include/c++/4.7/cwchar:191:11: error: ‘::wcstod’ has not been declared
/usr/include/c++/4.7/cwchar:193:11: error: ‘::wcstof’ has not been declared
/usr/include/c++/4.7/cwchar:195:11: error: ‘::wcstok’ has not been declared
/usr/include/c++/4.7/cwchar:196:11: error: ‘::wcstol’ has not been declared
/usr/include/c++/4.7/cwchar:197:11: error: ‘::wcstoul’ has not been declared
/usr/include/c++/4.7/cwchar:198:11: error: ‘::wcsxfrm’ has not been declared
/usr/include/c++/4.7/cwchar:199:11: error: ‘::wctob’ has not been declared
/usr/include/c++/4.7/cwchar:200:11: error: ‘::wmemcmp’ has not been declared
/usr/include/c++/4.7/cwchar:201:11: error: ‘::wmemcpy’ has not been declared
/usr/include/c++/4.7/cwchar:202:11: error: ‘::wmemmove’ has not been declared
/usr/include/c++/4.7/cwchar:203:11: error: ‘::wmemset’ has not been declared
/usr/include/c++/4.7/cwchar:204:11: error: ‘::wprintf’ has not been declared
/usr/include/c++/4.7/cwchar:205:11: error: ‘::wscanf’ has not been declared
/usr/include/c++/4.7/cwchar:206:11: error: ‘::wcschr’ has not been declared
/usr/include/c++/4.7/cwchar:207:11: error: ‘::wcspbrk’ has not been declared
/usr/include/c++/4.7/cwchar:208:11: error: ‘::wcsrchr’ has not been declared
/usr/include/c++/4.7/cwchar:209:11: error: ‘::wcsstr’ has not been declared
/usr/include/c++/4.7/cwchar:210:11: error: ‘::wmemchr’ has not been declared
/usr/include/c++/4.7/cwchar:250:11: error: ‘::wcstold’ has not been declared
/usr/include/c++/4.7/cwchar:259:11: error: ‘::wcstoll’ has not been declared
/usr/include/c++/4.7/cwchar:260:11: error: ‘::wcstoull’ has not been declared
/usr/include/c++/4.7/cwchar:266:11: error: ‘::__gnu_cxx’ has not been declared
/usr/include/c++/4.7/cwchar:267:11: error: ‘::__gnu_cxx’ has not been declared
/usr/include/c++/4.7/cwchar:268:11: error: ‘::__gnu_cxx’ has not been declared
In file included from /usr/include/c++/4.7/string:42:0,
from src/engine/gui/GUI.h:11,
from src/engine/gui/GUI.cpp:14:
/usr/include/c++/4.7/bits/char_traits.h:65:15: error: ‘mbstate_t’ in namespace ‘icee::engine::std’ does not name a type
In file included from /usr/include/c++/4.7/ext/new_allocator.h:34:0,
from /usr/include/c++/4.7/x86_64-linux-gnu/bits/c++allocator.h:34,
from /usr/include/c++/4.7/bits/allocator.h:48,
from /usr/include/c++/4.7/string:43,
from src/engine/gui/GUI.h:11,
from src/engine/gui/GUI.cpp:14:
/usr/include/c++/4.7/new:94:41: error: ‘void* icee::engine::operator new(icee::engine::std::size_t)’ may not be declared within a namespace
/usr/include/c++/4.7/new:96:41: error: ‘void* icee::engine::operator new [](icee::engine::std::size_t)’ may not be declared within a namespace
/usr/include/c++/4.7/new:98:41: error: ‘void icee::engine::operator delete(void*)’ may not be declared within a namespace
/usr/include/c++/4.7/new:100:41: error: ‘void icee::engine::operator delete [](void*)’ may not be declared within a namespace
/usr/include/c++/4.7/new:102:41: error: ‘void* icee::engine::operator new(icee::engine::std::size_t, const icee::engine::std::nothrow_t&)’ may not be declared within a namespace
/usr/include/c++/4.7/new:104:41: error: ‘void* icee::engine::operator new [](icee::engine::std::size_t, const icee::engine::std::nothrow_t&)’ may not be declared within a namespace
/usr/include/c++/4.7/new:106:41: error: ‘void icee::engine::operator delete(void*, const icee::engine::std::nothrow_t&)’ may not be declared within a namespace
/usr/include/c++/4.7/new:108:41: error: ‘void icee::engine::operator delete [](void*, const icee::engine::std::nothrow_t&)’ may not be declared within a namespace
/usr/include/c++/4.7/new:111:51: error: ‘void* icee::engine::operator new(icee::engine::std::size_t, void*)’ may not be declared within a namespace
/usr/include/c++/4.7/new:113:53: error: ‘void* icee::engine::operator new [](icee::engine::std::size_t, void*)’ may not be declared within a namespace
/usr/include/c++/4.7/new:117:45: error: ‘void icee::engine::operator delete(void*, void*)’ may not be declared within a namespace
/usr/include/c++/4.7/new:118:45: error: ‘void icee::engine::operator delete [](void*, void*)’ may not be declared within a namespace
In file included from /usr/include/c++/4.7/x86_64-linux-gnu/bits/c++locale.h:42:0,
from /usr/include/c++/4.7/bits/localefwd.h:42,
from /usr/include/c++/4.7/string:45,
from src/engine/gui/GUI.h:11,
from src/engine/gui/GUI.cpp:14:
/usr/include/c++/4.7/clocale:55:11: error: ‘::lconv’ has not been declared
/usr/include/c++/4.7/clocale:56:11: error: ‘::setlocale’ has not been declared
/usr/include/c++/4.7/clocale:57:11: error: ‘::localeconv’ has not been declared
In file included from /usr/include/c++/4.7/bits/localefwd.h:44:0,
from /usr/include/c++/4.7/string:45,
from src/engine/gui/GUI.h:11,
from src/engine/gui/GUI.cpp:14:
/usr/include/c++/4.7/cctype:66:11: error: ‘::isalnum’ has not been declared
/usr/include/c++/4.7/cctype:67:11: error: ‘::isalpha’ has not been declared
/usr/include/c++/4.7/cctype:68:11: error: ‘::iscntrl’ has not been declared
/usr/include/c++/4.7/cctype:69:11: error: ‘::isdigit’ has not been declared
/usr/include/c++/4.7/cctype:70:11: error: ‘::isgraph’ has not been declared
/usr/include/c++/4.7/cctype:71:11: error: ‘::islower’ has not been declared
/usr/include/c++/4.7/cctype:72:11: error: ‘::isprint’ has not been declared
/usr/include/c++/4.7/cctype:73:11: error: ‘::ispunct’ has not been declared
/usr/include/c++/4.7/cctype:74:11: error: ‘::isspace’ has not been declared
/usr/include/c++/4.7/cctype:75:11: error: ‘::isupper’ has not been declared
/usr/include/c++/4.7/cctype:76:11: error: ‘::isxdigit’ has not been declared
/usr/include/c++/4.7/cctype:77:11: error: ‘::tolower’ has not been declared
/usr/include/c++/4.7/cctype:78:11: error: ‘::toupper’ has not been declared
src/engine/gui/GUI.cpp:16:1: error: ‘GUI’ does not name a type
src/engine/gui/GUI.cpp:20:1: error: ‘GUI’ does not name a type
src/engine/gui/GUI.cpp:24:5: error: ‘GUI’ has not been declared
src/engine/gui/GUI.cpp:32:6: error: ‘GUI’ has not been declared
src/engine/gui/GUI.cpp:36:6: error: ‘GUI’ has not been declared
src/engine/gui/GUI.cpp:40:1: error: ‘GUIComponent’ does not name a type
scons: *** [build/engine/gui/GUI.o] Error 1
scons: building terminated because of errors.
GUI.h
是:
#ifndef GUI_H_
#define GUI_H_
#include <string>
#include "IGUI.h"
namespace icee {
namespace engine {
class GUI : public IGUI {
public:
GUI();
virtual ~GUI();
virtual int initialize();
virtual void destroy();
virtual void render();
virtual IGUIComponent* load(std::string filename);
};
}
}
#endif /* GUI_H_ */
和GUI.cpp
是:
namespace icee {
namespace engine {
#include <berkelium/Berkelium.hpp>
#include "GUI.h"
GUI::GUI() {
}
GUI::~GUI() {
}
int GUI::initialize() {
if (!Berkelium::init(Berkelium::FileString::empty())) {
return -1;
}
return 0;
}
void GUI::destroy() {
}
void GUI::render() {
}
GUIComponent* GUI::load(std::string filename) {
}
}
}
和IGUI.h
看起来像这样:
#ifndef IGUI_H_
#define IGUI_H_
#include <string>
#include "IGUIComponent.h"
namespace icee {
namespace engine {
class IGUI {
public:
IGUI();
virtual ~IGUI();
virtual int initialize() = 0;
virtual void destroy() = 0;
virtual void render() = 0;
virtual IGUIComponent* load(std::string filename) = 0;
};
}
}
#endif /* IGUI_H_ */
到目前为止,我有点难过。我尝试安装 build-essentials,但它已经安装好了。经过一些谷歌搜索后,问题似乎是某处缺少一些依赖项,但我不知道在哪里......
有人有什么想法吗?
干杯
最佳答案
您的问题是哪里包含:
namespace icee {
namespace engine {
#include <berkelium/Berkelium.hpp>
#include "GUI.h"
将它们移出命名空间。
关于c++ - #include <string> 导致大量 '<blank>' has not been declared 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13426672/
我有一个模板类 展览.h: template class ExpOf{ ... } 我在整个代码中反复使用,例如T = double [和其他类ExpOf应该一无所知]。 所以我认为一次性编译它是个
如果你有一个名为“Rock”的类,你会做类似的事情:- int main() { Rock; } 为什么会出现“声明未声明任何内容”错误? 它不应该只是调用默认构造函数并在那一刻创建对象吗?
这是一个非常业余的问题,我确信这将是一个非常简单的答案,但我似乎无法弄清楚问题所在。我有一个带有相应 .cpp 文件的头文件,但出于某种原因,每当我尝试使用 g++ 进行编译时,我都会收到错误消息:
我正在使用 MinGW 将我的 Linux 项目转换为在 Windows 上编译。它在 Linux 上编译和运行都很好,但是当我尝试用 MinGW 编译它时,它会出现以下错误消息: camera.h:
我收到“decleration does not declare anything [-fpermissive] 错误”;这是我的代码; #ifndef CAMERA_H #define CAMERA
我正在编写一些 cython 代码,但遇到了一个奇怪的问题。当我尝试将对象作为结构直接从 python 传递到 C 时,cython 生成的代码很好,但 gcc 不喜欢代码输出并给我以下错误:erro
typedef struct BO2Offsets { struct Prestige { u32 offset = 0x000000; char da
我不明白 C++ 中的某些东西,gcc 不喜欢我如何进行。 我做到了: if (!fModeMdi) MyFirstClass* main = (MyFirstClas
在 switch-case 语句中,declaration-with-initialization 是无效的,但允许 declaration-and-then-assignment。如以下代码片段所示
我在我的界面文件中收到一条奇怪的警告。 这也出现在我为此声明属性的那一行。 谁能帮帮我? 最佳答案 在您的项目中的某处,您有一个 #define 将 xOffset 定义为空(除了注释)。像这样: #
declare +x 下面做了什么? (特定于 Bash。)我理解 declare -x,但不理解 declare +x: function the_func { declare +x MY_VA
由于我是 Symfony 的新手,我尝试使用 Doctrine 创建实体关系。我收到错误 “[bundle/entity/file_location”中的属性“report”已经声明,但在我尝试更新架
关闭。这个问题是not reproducible or was caused by typos .它目前不接受答案。 想改进这个问题?将问题更新为 on-topic对于堆栈溢出。 2年前关闭。 Imp
这是给我错误的代码: TAdvSmoothDockItems = class(TCollection) private FOwner: TAdvSmoothDock; FOnChange: T
我对 python 很陌生,我尝试制作一个简单的 GUI 程序。但是,我遇到了一个“问题”,确切地说是一个警告,上面写着:“m”未在全局范围内定义(Python(变量未定义全局))。 我知道如果你想在
当我用 GCC 编译程序时,它会显示“警告:声明未声明任何内容 [-fpermissive]”。 有问题的代码如下: typedef int BOOL; 如何清除警告? 最佳答案 您可以尝试以下操作。
我正在编写一个包含键值对集合的重要类,在编译期间我收到一个我无法弄清楚的非常奇怪的错误。在一个与这里的函数非常相似的函数中,但由于所需代码的复杂性而没有上下文,我收到错误: TValue& opera
这个问题很简单。为了进一步阐明,下面代码中的 Foo1 和 Foo2 在它们的声明方式方面到底有什么区别(例如,使用 class Foo1 { 。 .. }; 而另一个使用 typedef class
我正在开发 Web 项目,并且在从 Oracle 数据库迁移到 mysql 数据库时遇到一些问题。我想用这段代码创建函数: DROP FUNCTION IF EXISTS F_MANIFEST_GAB
是否有一个标志可以传递给 gcc 以禁用此警告?我知道它的作用,但这对我的程序来说无关紧要。 编辑:我只想禁用警告,保持代码不变。编译以下代码会生成警告: struct post{ unsigne
我是一名优秀的程序员,十分优秀!