OOLua compile errors

穿精又带淫゛_ 提交于 2019-12-24 16:15:39

问题


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

OOLua link errors


回答1:


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




回答2:


It is only by chance that I have seen your message here, I would encourage you to use the forms of communication which I have detailed to you. I will not only be able to help you yet also anybody else who has similar problems. As with any link errors for any library please post an example which displays the errors and the error messages in their entirety, as I will be more equipped to help you. Thank you Liam



来源:https://stackoverflow.com/questions/2009434/oolua-compile-errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!