473,657 Members | 2,932 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

reference

Hi
this error:

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

and that definition:

void CJoysticksManag er::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 2356
Michael Sgier <sg***@nospam.c hwrote:
Release/src/Devices/Joysticks.o: In function
`CJoysticksMana ger::EnumAll()' : Joysticks.cpp:( .text+0x1b16):
undefined reference to `jsJoystick::js Joystick(int)'
Joysticks.cpp:( .text+0x1bf2): undefined reference to
`jsJoystick::js Joystick(int)'
void CJoysticksManag er::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.c hwrote:
>Release/src/Devices/Joysticks.o: In function
`CJoysticksMan ager::EnumAll() ': Joysticks.cpp:( .text+0x1b16):
undefined reference to `jsJoystick::js Joystick(int)'
Joysticks.cpp: (.text+0x1bf2): undefined reference to
`jsJoystick::j sJoystick(int)'
>void CJoysticksManag er::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
13115
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 Unixware/C++/AT&T componets environment. I have been able to compile all modules after making necessary changes in LINUX/gcc/STL environment. We have two templates defined XList and XMap.
110
9899
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 must be an object instead of
11
2189
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
17916
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 create another Area and assign myArea to it (ie: Area foo = myArea;) or is there a better way? ~AF
4
3400
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 42. They say that 42 is printed the second time since the value was wrapped in a class and therefore became passed by reference. (sorry for any typos I am a newbie here ;-)
13
2652
by: al.cpwn | last post by:
I get that these two are different int* get() { static int m; return &m; } int& get() {
51
4434
by: Kuku | last post by:
What is the difference between a reference and a pointer?
27
4206
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
3639
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 pointer and reference are and how they relate to each other.
275
12247
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
8384
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8302
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8499
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8601
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7314
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5630
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1937
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.