reference

M

Michael Sgier

Hi
this error:

Release/src/Devices/Joysticks.o: In function `CJoysticksManager::EnumAll()':
Joysticks.cpp:(.text+0x1b16): undefined reference to
`jsJoystick::jsJoystick(int)'
Joysticks.cpp:(.text+0x1bf2): undefined reference to
`jsJoystick::jsJoystick(int)'

and that definition:

void CJoysticksManager::EnumAll()
{
int i=0;
int iNumAxes = 0;
jsJoystick * pJoy = NULL;
SJoyInfo * pJStruct = NULL;
float * fCopyTab = NULL;

FreeJoyList();
pJoy = new jsJoystick(i);


So what am i doing wrong?
THANKS Michael
 
J

Jakob Bieling

Michael Sgier said:
Release/src/Devices/Joysticks.o: In function
`CJoysticksManager::EnumAll()': Joysticks.cpp:(.text+0x1b16):
undefined reference to `jsJoystick::jsJoystick(int)'
Joysticks.cpp:(.text+0x1bf2): undefined reference to
`jsJoystick::jsJoystick(int)'
void CJoysticksManager::EnumAll()
{
int i=0;
int iNumAxes = 0;
jsJoystick * pJoy = NULL;
SJoyInfo * pJStruct = NULL;
float * fCopyTab = NULL;

FreeJoyList();
pJoy = new jsJoystick(i);


So what am i doing wrong?

Looks like the compiler cannot find the constructor in 'jsJoystick',
which takes one argument of type 'int'. Make sure you have defined such
a constructor.

hth
 
R

Rolf Magnus

Jakob said:
Looks like the compiler cannot find the constructor in 'jsJoystick',
which takes one argument of type 'int'.

Actually, it looks like the compiler does find it, but the linker doesn't.
Make sure you have defined such a constructor.

And linked against the object file or library that contains the defintion.
 

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

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top