OOLua编译错误 [英] OOLua compile errors
问题描述
代码
#include 类 foo{民众:内部酒吧();};OOLUA_CLASS_NO_BASES(foo)//类没有基OOLUA_NO_TYPEDEFSOOLUA_MEM_FUN_0(int,bar)OOLUA_CLASS_END
编译器输出
main.cpp(21):错误 C2061:语法错误:标识符bar"main.cpp(22):错误 C2143:语法错误:缺少;"前 '}'main.cpp(22):错误 C4430:缺少类型说明符 - 假设为 int.注意:C++ 不支持 default-intmain.cpp(22):警告 C4183:'OOLUA_MEM_FUN_0':缺少返回类型;假定是一个返回int"的成员函数
使用
Visual Studio 2008
OOLua 1.2.1
(OOLua .lib 已构建并链接到)
链接
http://code.google.com/p/oolua/>
问题
怎么解决?代码段来自 OOLua 谷歌代码网站的Cheat Sheet".
已解决 -> 但仍有问题
很抱歉您在使用图书馆时遇到问题,我们为您所看到的问题设置了邮件列表http://groups.google.com/group/oolua-user?pli=1
问题是由于备忘单中的OOLUA_MEM_FUN_0"应为OOLUA_MEM_FUNC_0"的拼写错误.感谢您提请注意此事,我将对此进行更正.利亚姆
Code
#include <OOLua/oolua.h>
class foo
{
public:
int bar();
};
OOLUA_CLASS_NO_BASES(foo)//class has no bases
OOLUA_NO_TYPEDEFS
OOLUA_MEM_FUN_0(int,bar)
OOLUA_CLASS_END
Compiler output
main.cpp(21) : error C2061: syntax error : identifier 'bar'
main.cpp(22) : error C2143: syntax error : missing ';' before '}'
main.cpp(22) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
main.cpp(22) : warning C4183: 'OOLUA_MEM_FUN_0': missing return type; assumed to be a member function returning 'int'
Using
Visual Studio 2008
OOLua 1.2.1
(OOLua .lib has been built and linked to)
Links
http://code.google.com/p/oolua/
Question
How can it be fixed? The code segment is from the 'Cheat Sheet' of OOLua's google code website.
Solved -> but still has problems
I am sorry you are having problems with the library, there is a mailing list set up for problems such as you are seeing http://groups.google.com/group/oolua-user?pli=1
The problem is due to a typo in the cheat sheet where "OOLUA_MEM_FUN_0" should read "OOLUA_MEM_FUNC_0". Thank you for drawing attention to the matter I will correct this. Liam
这篇关于OOLua编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!