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 ';' befor开发者_Python百科e '}'
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
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
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
精彩评论