Scroll - anonymous function shenanigans

edited September 2012 in Help request
Alright, this is my first time trying to use scroll. I tried compiling my code, just to make sure my header files didn't have any syntax errors before writing the code for the functions and the ini files and all that fun stuff. But I keep getting this error:

In file included from /home/chaz/Projects/Sweet Dreams Project/SDP00/src/paradigm.cpp:1:0:
/home/chaz/Projects/Sweet Dreams Project/SDP00/src/paradigm.h:26:1: warning: ISO C++ prohibits anonymous structs [-pedantic]
/home/chaz/Projects/Sweet Dreams Project/SDP00/src/paradigm.h:8:16: error: an anonymous struct cannot have function members
/home/chaz/Projects/Sweet Dreams Project/SDP00/src/paradigm.h:8:16: error: member ‘ScrollObject <anonymous class>::<anonymous>’ with constructor not allowed in anonymous aggregate
/home/chaz/Projects/Sweet Dreams Project/SDP00/src/paradigm.h:8:16: error: member ‘ScrollObject <anonymous class>::<anonymous>’ with destructor not allowed in anonymous aggregate
/home/chaz/Projects/Sweet Dreams Project/SDP00/src/paradigm.h:8:16: error: member ‘ScrollObject <anonymous class>::<anonymous>’ with copy assignment operator not allowed in anonymous aggregate
/home/chaz/Projects/Sweet Dreams Project/SDP00/src/paradigm.h:26:1: error: abstract declarator ‘<anonymous class>’ used as declaration

Well, I have no clue what's wrong. Here's my class:

#ifndef Paradigm
#define Paradigm
#include "OrxScroll.h"
#include "weapon.h"
#include "bomb.h"
#include "skill.h"

class Paradigm : public ScrollObject
{
    Weapon *p_weapon;
    Bomb   *p_bomb;
    Skill  *p_skill;
    
    // Callback functions.
    virtual void    OnCreate    ();
    virtual void    OnDelete    ();
    virtual void    Update      (const orxCLOCK_INFO &_rstInfo);
    virtual orxBOOL OnCollide   (      ScrollObject *_poCollider, const orxSTRING _zPartName,
                                 const orxVECTOR    &_rvPosition, const orxVECTOR &_rvNormal);
    
public:
    void FireWeapon    ();
    void LaunchBomb    ();
    void ActivateSkill ();

};

#endif // Paradigm

None of the functions are defined yet. I wonder if that's what's causing this?

Comments

  • edited September 2012
    I feel like the real problem lies somewhere else. :)
    Maybe can you send us your project if you want us to check?
  • edited September 2012
    I fixed my problem; after all these years, I didn't know that anonymous structs/classes were not "standard" C++. Oops. Well, I fixed it. Now I'm getting an error that says my class that derives from Scroll has multiple definitions and is "first defined" in orxMath.h. Which is impossible. No matter what I change the name of the class to, it give me the same error, so it's not a name conflict. Then, it gives me a ton of undefined references to _orxDebug_Get_Flags and then spouts weird gibberish about vtables.
Sign In or Register to comment.