473,324 Members | 2,257 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

reference

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
Jul 30 '06 #1
2 2326
Michael Sgier <sg***@nospam.chwrote:
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
--
jb

(reply address in rot13, unscramble first)
Jul 30 '06 #2
Jakob Bieling wrote:
Michael Sgier <sg***@nospam.chwrote:
>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'.
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.

Jul 30 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: RU | last post by:
Hi, I am working on a porting project to port C/C++ application from unixware C++, AT&T Standard components to g++ with STL on Linux. This application has been working properly on...
110
by: Mr A | last post by:
Hi! I've been thinking about passing parameteras using references instead of pointers in order to emphasize that the parameter must be an object. Exemple: void func(Objec& object); //object...
11
by: Doug | last post by:
Is there any harm in passing an object into a method with the 'ref' keyword if the object is already a reference variable? If not, is there any benefit?
13
by: Abe Frohnman | last post by:
Hello all, I'm passing a reference to a class into the constructor of a form, like so: public MyForm(int count, ref Area myArea) {...} How can I use myArea outside the constructor? Should I...
4
by: z_learning_tester | last post by:
I'm reading the MS press C# book and there seems to be a contradiction. Please tell me which one is correct, 1 or 2. Thanks! Jeff 1. First it gives the code below saying that it prints 0 then...
13
by: al.cpwn | last post by:
I get that these two are different int* get() { static int m; return &m; } int& get() {
51
by: Kuku | last post by:
What is the difference between a reference and a pointer?
27
by: David W | last post by:
I'm almost tearing my hair out. A colleague claimed that a null reference can exist, like this: void f( int& p ) { printf( "%d\n", p ); } int main (int argc, char *argv) {
41
by: Summercool | last post by:
Can we confirm the following? also someone said, Java also has "reference" like in C++, which is an "implicit pointer": Pointer and Reference --------------------- I am starting to see what...
275
by: Astley Le Jasper | last post by:
Sorry for the numpty question ... How do you find the reference name of an object? So if i have this bob = modulename.objectname() how do i find that the name is 'bob'
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.