reference

M

Michael Sgier

Hi
why that error?
Main.cpp:(.text+0xd0f): undefined reference to
`CJoysticksManager::CJoysticksManager()'

the constructor is in Joysticks.h:
class CJoysticksManager : public CStreamObject
{
public:
CJoysticksManager();



in main.cpp:
globals->joymgr = new CJoysticksManager();

and in globals.h:
CJoysticksManager *joymgr;

headers are included:
#include "../Include/FlyLegacy.h"
#include "../Include/Joysticks.h"
#include "../Include/Globals.h"
 
V

Victor Bazarov

Michael said:
why that error?
Main.cpp:(.text+0xd0f): undefined reference to
`CJoysticksManager::CJoysticksManager()'

the constructor is in Joysticks.h:
class CJoysticksManager : public CStreamObject
{
public:
CJoysticksManager();



in main.cpp:
globals->joymgr = new CJoysticksManager();

and in globals.h:
CJoysticksManager *joymgr;

headers are included:
#include "../Include/FlyLegacy.h"
#include "../Include/Joysticks.h"
#include "../Include/Globals.h"

You declared the default constructor, you used it in the "new"
expression. Where is it *defined*?

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top