OOLua编译错误

时间:2010-01-05 22:02:12

标签: c++ visual-studio-2008 oolua

代码

#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谷歌代码网站的“备忘单”。

已解决 - &gt;但仍有问题

OOLua link errors

2 个答案:

答案 0 :(得分:2)

我很抱歉你在图书馆遇到问题,有一个邮件列表设置为你遇到的问题http://groups.google.com/group/oolua-user?pli=1

问题是由于备忘单中的拼写错误,其中“OOLUA_MEM_FUN_0”应为“OOLUA_MEM_FUNC_0”。感谢您提请注意我将纠正此事。 利安

答案 1 :(得分:0)

我只是偶然地在这里看到了你的信息,我鼓励你使用我向你详细介绍的沟通方式。我不仅能够帮助你,还有其他有类似问题的人。 与任何库的任何链接错误一样,请发布一个显示错误和错误消息的示例,因为我将更有能力为您提供帮助。 谢谢 利安