代码之家  ›  专栏  ›  技术社区  ›  HyperCas

oolua编译错误

  •  1
  • HyperCas  · 技术社区  · 16 年前

    代码

    #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
    奥洛亚1.2.1

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

    链接

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

    问题

    如何修复?代码段来自乌鲁瓦谷歌代码网站的“备忘表”。

    已解决-但仍有问题

    OOLua link errors

    2 回复  |  直到 16 年前
        1
  •  2
  •   user244655    16 年前

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

    问题是由于作弊单上的一个拼写错误,“oolua-mem-fun-0”应该读“oolua-mem-func-0”。谢谢你提醒我注意这件事,我会改正的。 利亚姆

        2
  •  0
  •   user244655    16 年前

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