I try use a static object that is a member of a class, but get error:
1 2 3 4 5
Undefined symbols for architecture armv6:
"GameObjects::splashManager", referenced from:
AppDelegate::applicationDidFinishLaunching() in AppDelegate.o
ld: symbol(s) not found for architecture armv6
collect2: ld returned 1 exit status
My class header is:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#ifndef GameObjects_H
#define GameObjects_H
#include "SplashManager.h"
class SplashManager;
class GameObjects
{
public:
virtual ~GameObjects() {}
static SplashManager *splashManager;
};
#endif
SplashManager *GameObjects::splashManager = 0;
you don't need to redefine the type of splashmenager, try to use just GameObjects::splashManager = 0; and it should work just fine.