gpt4 book ai didi

c++ - OOLua编译错误

转载 作者:行者123 更新时间:2023-11-30 04:39:43 25 4
gpt4 key购买 nike

代码

#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

编译器输出

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'

使用

Visual Studio 2008
OOLua 1.2.1

(OOLua .lib 已构建并链接到)

链接

http://code.google.com/p/oolua/

问题

如何解决?代码段来自 OOLua 的谷歌代码网站的“Cheat Sheet”。

已解决->但仍有问题

OOLua link errors

最佳答案

很抱歉您在使用图书馆时遇到问题,我们为您所看到的问题设立了一个邮件列表 http://groups.google.com/group/oolua-user?pli=1

问题是由于备忘单中的错字造成的,其中“OOLUA_MEM_FUN_0”应该读作“OOLUA_MEM_FUNC_0”。感谢您提请注意此事,我将更正此问题。利亚姆

关于c++ - OOLua编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2009434/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com