473,473 Members | 1,419 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

undefined reference error

I get an undefined reference error for a definition that clearly looks
like it is in a .h file. So
what can be the cause of an undefined reference error, when this .h
file containing the definition has been included and the namespace has
been declared.

I blame engineers they are all ponsey zealots.

Feb 6 '06 #1
40 3161
vf***@talktalk.net wrote:
I get an undefined reference error for a definition that clearly looks
like it is in a .h file.
You cannot put "clearly" and "looks like" in the same sentence. It's
either there or it isn't.
So
what can be the cause of an undefined reference error, when this .h
file containing the definition has been included and the namespace has
been declared.
The error is on the line 42 of your source code.
I blame engineers they are all ponsey zealots.


Yes. That's it.

V
--
Please remove capital As from my address when replying by mail
Feb 6 '06 #2

<vf***@talktalk.net> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I get an undefined reference error for a definition that clearly looks
like it is in a .h file. So
what can be the cause of an undefined reference error, when this .h
file containing the definition has been included and the namespace has
been declared.

Without seeing the code (or even the specific text of the error), it's
impossible to know. Perhaps, since you use the word "undefined", it's a
link error, not a compile error? You might have declared something but not
defined it. (There is a difference.) Or, you might not have properly
included the source file in your build.

More info, please.
I blame engineers they are all ponsey zealots.


What???
-Howard
Feb 6 '06 #3
Why do you bother responding if that is your attitude? It does clearly
look like the same reference, I cannot say for sure that it is the same
thing, one is a class member and the other is I don't know, the
definition is...

namespace audiere
{
....
class ParameterList {
public:
ParameterList

and the reference to it is said to be...

audiere::ParameterList::ParameterList(char const*)

by the compiler.

Does that satisfy your curiosity?

Feb 6 '06 #4
The lib is referenced using -L ../lib in the compiler
and the header file included.

Feb 6 '06 #5
"Why do you bother responding if that is your attitude?"
was directed at that Victor guy.
Without seeing the code (or even the specific text of the error), it's
impossible to know.


I think that is the problem with using other peoples code and any
hidden information but then again
not many people have the time to create there own electronics,
operating system, compiler ...

Feb 6 '06 #6
vf***@talktalk.net wrote:
Why do you bother responding if that is your attitude? It does clearly
look like the same reference, I cannot say for sure that it is the same
thing, one is a class member and the other is I don't know, the
definition is...

namespace audiere
{
...
class ParameterList {
public:
ParameterList
And??? Don't bother. I've lost interest in helping you.

and the reference to it is said to be...

audiere::ParameterList::ParameterList(char const*)

by the compiler.

Does that satisfy your curiosity?


Yes. Now go solve your own problem. I was curious how far your arrogance
stretched, and you've shown that it stretches too far for my taste.

If you want help, learn to supply enough information. And read the FAQ
(http://www.parashift.com/c++-faq-lite/).
Feb 6 '06 #7
I am definitely not an arrogant person.

Feb 6 '06 #8
In article <11**********************@f14g2000cwb.googlegroups .com>,
"vf***@talktalk.net" <vf***@talktalk.net> wrote:
I get an undefined reference error for a definition that clearly looks
like it is in a .h file. So
what can be the cause of an undefined reference error, when this .h
file containing the definition has been included and the namespace has
been declared.


Please understand, there are many of us here that are happy to help you,
however your question above is equivalent to the following one, "The
compiler says that my code is broken but everything is right. What is
the problem?"

Trust me, the compiler is right. If it says you have an "undefined
reference error for a definition" then you in fact have one no matter
what you may think.

Now, can we see the exact text of the error message? No one can help you
without it.

--
Magic depends on tradition and belief. It does not welcome observation,
nor does it profit by experiment. On the other hand, science is based
on experience; it is open to correction by observation and experiment.
Feb 6 '06 #9
Hi

vf***@talktalk.net wrote:
I am definitely not an arrogant person.


But you try hard to make other people think you are.
What do you think does "that Victor guy" sound like?

But I'm more and more getting the impression that your only interest is in
trolling... so... feel free.

Markus

Feb 6 '06 #10
I am only looking at the top error at this time (5 lines down)

$ make
g++ mytest.cpp -I ../src -L ../lib -o mytest.exe
/cygdrive/c/DOCUME~1/Daniel/LOCALS~1/Temp/ccZxZ4i6.o:mytest.cpp:(.text+0x492):
u
ndefined reference to
`audiere::NullAudioDevice::create(audiere::Paramet erList c
onst&)'
/cygdrive/c/DOCUME~1/Daniel/LOCALS~1/Temp/ccZxZ4i6.o:mytest.cpp:(.text+0x540):
u
ndefined reference to `audiere::ParameterList::ParameterList(char
const*)'
/cygdrive/c/DOCUME~1/Daniel/LOCALS~1/Temp/ccZxZ4i6.o:mytest.cpp:(.text$_ZN7audie
re14ThreadedDeviceC1EPNS_11AudioDeviceE[audiere::ThreadedDevice::ThreadedDevice(
audiere::AudioDevice*)]+0xae): undefined reference to
`audiere::AI_CreateThread(
void (*)(void*), void*, int)'
/cygdrive/c/DOCUME~1/Daniel/LOCALS~1/Temp/ccZxZ4i6.o:mytest.cpp:(.text$_ZN7audie
re14ThreadedDeviceD0Ev[audiere::ThreadedDevice::~ThreadedDevice()]+0x5f):
undefi
ned reference to `audiere::AI_Sleep(unsigned int)'
/cygdrive/c/DOCUME~1/Daniel/LOCALS~1/Temp/ccZxZ4i6.o:mytest.cpp:(.text$_ZN7audie
re14ThreadedDeviceD1Ev[audiere::ThreadedDevice::~ThreadedDevice()]+0x5f):
undefi
ned reference to `audiere::AI_Sleep(unsigned int)'
collect2: ld returned 1 exit status
make: *** [mytest] Error 1

Feb 6 '06 #11
well actually 7 lines down now.

Feb 6 '06 #12
If I could find some software that worked for me then I would not need
to troll.

Feb 6 '06 #13

<vf***@talktalk.net> wrote in message
news:11*********************@g47g2000cwa.googlegro ups.com...
"Why do you bother responding if that is your attitude?"
was directed at that Victor guy.


What??? Who was _this_ statement directed to?
Without seeing the code (or even the specific text of the error), it's
impossible to know.


I think that is the problem with using other peoples code and any
hidden information but then again
not many people have the time to create there own electronics,
operating system, compiler ...


Umm, ok.... still no information here. If you want help, you've got to try
to help us help you.

You could start by quoting relevant portions of the message you're
responding to, and continue by adding any additional information you are
asked for and have access to. For more info on how to properly post to this
newsgroup, see:

http://www.parashift.com/c++-faq-lite/

(esp. section 5.8)

-Howard

Feb 6 '06 #14
There are alot of sections in that faq, most of them are not relevant
to my query. Where is that info you are refering to?
My qualm with this group is that you sidestep general questions,
my general question is
"what can be the cause of an undefined reference error"
if you people are not prepared to give a straight forward answer that
question then I am not asking in the right place.
You might have declared something but not
defined it. (There is a difference.)


Thanks for that Howard. I checked this and it made no difference, I
have included the .h file of the cpp file that contains the definition.

The only info I've got from all this is that there are other people
hunched over there computers who don't seem to know any more than I do
about this particular error message.

Why should I have divulge my knowledge, or lack of it to elicit a
useful answer?
Why should people have to post their exact code / compiler setup to get
an answer?

Feb 6 '06 #15
In article <11**********************@f14g2000cwb.googlegroups .com>,
"vf***@talktalk.net" <vf***@talktalk.net> wrote:
I am only looking at the top error at this time (5 lines down)

$ make
g++ mytest.cpp -I ../src -L ../lib -o mytest.exe
/cygdrive/c/DOCUME~1/Daniel/LOCALS~1/Temp/ccZxZ4i6.o:mytest.cpp:(.text+0x492):
u
ndefined reference to
`audiere::NullAudioDevice::create(audiere::Paramet erList c
onst&)'
/cygdrive/c/DOCUME~1/Daniel/LOCALS~1/Temp/ccZxZ4i6.o:mytest.cpp:(.text+0x540):
u
ndefined reference to `audiere::ParameterList::ParameterList(char
const*)'
/cygdrive/c/DOCUME~1/Daniel/LOCALS~1/Temp/ccZxZ4i6.o:mytest.cpp:(.text$_ZN7aud
ie
re14ThreadedDeviceC1EPNS_11AudioDeviceE[audiere::ThreadedDevice::ThreadedDevic
e(
audiere::AudioDevice*)]+0xae): undefined reference to
`audiere::AI_CreateThread(
void (*)(void*), void*, int)'
/cygdrive/c/DOCUME~1/Daniel/LOCALS~1/Temp/ccZxZ4i6.o:mytest.cpp:(.text$_ZN7aud
ie
re14ThreadedDeviceD0Ev[audiere::ThreadedDevice::~ThreadedDevice()]+0x5f):
undefi
ned reference to `audiere::AI_Sleep(unsigned int)'
/cygdrive/c/DOCUME~1/Daniel/LOCALS~1/Temp/ccZxZ4i6.o:mytest.cpp:(.text$_ZN7aud
ie
re14ThreadedDeviceD1Ev[audiere::ThreadedDevice::~ThreadedDevice()]+0x5f):
undefi
ned reference to `audiere::AI_Sleep(unsigned int)'
collect2: ld returned 1 exit status
make: *** [mytest] Error 1


OK, simple. Your compiler isn't finding the audiere object file. You
will have to ask in a newsgroup that specializes in your particular
compiler to find out how to set it up so that it can find the right file.

--
Magic depends on tradition and belief. It does not welcome observation,
nor does it profit by experiment. On the other hand, science is based
on experience; it is open to correction by observation and experiment.
Feb 6 '06 #16
vf***@talktalk.net wrote:
If I could find some software that worked for me then I would not need
to troll.


You can't troll people who don't see your posts.
*plonk*

Brian

--
Please quote enough of the previous message for context. To do so from
Google, click "show options" and use the Reply shown in the expanded
header.
Feb 6 '06 #17
"vf***@talktalk.net" <vf***@talktalk.net> wrote in
news:11**********************@g47g2000cwa.googlegr oups.com:
There are alot of sections in that faq, most of them are not relevant
to my query. Where is that info you are refering to?
Exactly the section he specified. Section 5.8.
My qualm with this group is that you sidestep general questions,
my general question is
"what can be the cause of an undefined reference error"
The general answer is that you have constructed an identifier that does
not exist in the object code. There, now wasn't that a useful answer?
if you people are not prepared to give a straight forward answer that
question then I am not asking in the right place.
The straightforward answer is probably useless (see the answer above).
You might have declared something but not
defined it. (There is a difference.)


Thanks for that Howard. I checked this and it made no difference, I
have included the .h file of the cpp file that contains the definition.


Then there is probably something you are failing to see. Can't see the
forest for the trees, and that sort of thing. Kindof a form of tunnel
vision where you are reading what you want to read, not what's on the
screen (note that this isn't a criticism or failing of you, I'm sure
quite a few of us have spent a long time (OK, probably the first time you
encounter it) trying to track down a compiler problem which worked out to
be a missing semicolon somewhere).
The only info I've got from all this is that there are other people
hunched over there computers who don't seem to know any more than I do
about this particular error message.
Many of us know quite a bit about the error message (including Victor).
We ask the clarification questions so we can show you what's wrong.
Why should I have divulge my knowledge, or lack of it to elicit a
useful answer?
Why should people have to post their exact code / compiler setup to get
an answer?


Because "the devil is in the details". You apparently think that your
code is perfectly constructed. Your compiler disagrees. The only way
that we can "arbritrate" on who's right (and unfortunately, it's likely
the compiler...) is to see the code. At which point we can then point
out exactly what's wrong (or determine that the problem actually does lie
with the compiler).
Feb 6 '06 #18

<vf***@talktalk.net> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
There are alot of sections in that faq, most of them are not relevant
to my query. Where is that info you are refering to?
As I said, check section 5.8, which describes the best way to post here to
get answers to questions.
My qualm with this group is that you sidestep general questions,
That's not our intent. We assumed you wanted specific help with your
problem, and there simply wasn't enough info to go on. So we asked for more
info.
my general question is
"what can be the cause of an undefined reference error"
I gave you a couple "general reasons". If that's all you wanted, then I
guess we're done here...? If you ned more help, then we need more info,
that's all.
if you people are not prepared to give a straight forward answer that
question then I am not asking in the right place.
You might have declared something but not
defined it. (There is a difference.)
Thanks for that Howard. I checked this and it made no difference, I
have included the .h file of the cpp file that contains the definition.


That's good, but just saying the definition is there doesn't solve the
problem. If you still need help, and you don't want to post all your code
(which is quite reasonable on your part) then your best bet is to try to
recreate the problem in a small separate project, and post _that_ code so
that we can try it out and see for ourselves.
The only info I've got from all this is that there are other people
hunched over there computers who don't seem to know any more than I do
about this particular error message.
Until you actually posted the error messages, nobody knew for certain what
the error message really was. And without knowing your code, it's just too
hard to tell why you might have gotten an error.

Why should I have divulge my knowledge, or lack of it to elicit a
useful answer?
Why should people have to post their exact code / compiler setup to get
an answer?


You don't have to do anything, but if you want help, then the easier you
make it for us, the easier we can make it for you.

If you just want a "general" answer, then you might make that very explicit
in your question. We're just trying to help you find the _actual_ answer to
your question, not make random guesses. But I gave you two random guesses.
If those help, then I'm glad I could help. If not, then you need to decide
if you want more help or not, and if you do, then some more effort on your
part will be required.

-Howard

Feb 6 '06 #19
In article <11**********************@g47g2000cwa.googlegroups .com>,
"vf***@talktalk.net" <vf***@talktalk.net> wrote:
There are alot of sections in that faq, most of them are not relevant
to my query. Where is that info you are refering to?
My qualm with this group is that you sidestep general questions,
my general question is
"what can be the cause of an undefined reference error"
if you people are not prepared to give a straight forward answer that
question then I am not asking in the right place.
The straight forward answer is: Your code makes a reference to something
that isn't defined.

Did you notice how easy it was for me to answer the question when you
actually produced the error message rather than the general question
above (in which the answer is obvious?)
You might have declared something but not
defined it. (There is a difference.)


Thanks for that Howard. I checked this and it made no difference, I
have included the .h file of the cpp file that contains the definition.

The only info I've got from all this is that there are other people
hunched over there computers who don't seem to know any more than I do
about this particular error message.


We know a lot about that particular error message, unfortunately it was
like pulling teeth to get you to actually *show* us the error message.
Why should I have divulge my knowledge, or lack of it to elicit a
useful answer?
Why should people have to post their exact code / compiler setup to get
an answer?


"I have a question. What's the answer?" "Why should I have to explain
what the question is or why I am asking? Just answer the question
already!" Bet you can't answer it...

--
Magic depends on tradition and belief. It does not welcome observation,
nor does it profit by experiment. On the other hand, science is based
on experience; it is open to correction by observation and experiment.
Feb 6 '06 #20
"vf***@talktalk.net" <vf***@talktalk.net> wrote in
news:11**********************@f14g2000cwb.googlegr oups.com:
I am only looking at the top error at this time (5 lines down)

$ make
g++ mytest.cpp -I ../src -L ../lib -o mytest.exe
/cygdrive/c/DOCUME~1/Daniel/LOCALS~1/Temp/ccZxZ4i6.o:mytest.cpp:(.text+
0x492): u
ndefined reference to
`audiere::NullAudioDevice::create(audiere::Paramet erList c
onst&)'
/cygdrive/c/DOCUME~1/Daniel/LOCALS~1/Temp/ccZxZ4i6.o:mytest.cpp:(.text+
0x540): u
ndefined reference to `audiere::ParameterList::ParameterList(char
const*)'
/cygdrive/c/DOCUME~1/Daniel/LOCALS~1/Temp/ccZxZ4i6.o:mytest.cpp:(.text$
_ZN7audie
re14ThreadedDeviceC1EPNS_11AudioDeviceE[audiere::ThreadedDevice::Thread
edDevice( audiere::AudioDevice*)]+0xae): undefined reference to
`audiere::AI_CreateThread(
void (*)(void*), void*, int)'
/cygdrive/c/DOCUME~1/Daniel/LOCALS~1/Temp/ccZxZ4i6.o:mytest.cpp:(.text$
_ZN7audie
re14ThreadedDeviceD0Ev[audiere::ThreadedDevice::~ThreadedDevice()]+0x5f
): undefi
ned reference to `audiere::AI_Sleep(unsigned int)'
/cygdrive/c/DOCUME~1/Daniel/LOCALS~1/Temp/ccZxZ4i6.o:mytest.cpp:(.text$
_ZN7audie
re14ThreadedDeviceD1Ev[audiere::ThreadedDevice::~ThreadedDevice()]+0x5f
): undefi
ned reference to `audiere::AI_Sleep(unsigned int)'
collect2: ld returned 1 exit status
make: *** [mytest] Error 1


OK, where are all of the function bodies for audiere::ParameterList ?
Also, where are the function bodies for audiere::AI_Sleep ? As Daniel C.
has mentioned, this looks like the compiler (well, linker actually) can't
find the object code for these functions/classes.

So far you've told the compiler to compile mytest.cpp, and to make an
executable. You've mentioned where your libraries are, but you haven't
told the compiler which libraries to use.
Feb 6 '06 #21
In article <Xn*******************************@207.35.177.134> ,
Andre Kostur <nn******@kostur.net> wrote:
So far you've told the compiler to compile mytest.cpp, and to make an
executable. You've mentioned where your libraries are, but you haven't
told the compiler which libraries to use.


My guess is he never compiled the audiere library after he d/l'ed it
from sourceforge.

--
Magic depends on tradition and belief. It does not welcome observation,
nor does it profit by experiment. On the other hand, science is based
on experience; it is open to correction by observation and experiment.
Feb 6 '06 #22
In article <Xn*******************************@207.35.177.134> ,
Andre Kostur <nn******@kostur.net> wrote:
Then there is probably something you are failing to see. Can't see the
forest for the trees, and that sort of thing. Kindof a form of tunnel
vision where you are reading what you want to read, not what's on the
screen (note that this isn't a criticism or failing of you, I'm sure
quite a few of us have spent a long time (OK, probably the first time you
encounter it) trying to track down a compiler problem which worked out to
be a missing semicolon somewhere).


I remember once spending two weeks (at 40 hrs/week) tracking down an
error that resolved to a '2' in the code instead of a '4'. (It was
causing memory overwrites.) My boss was very unhappy, I'm glad I didn't
write the original code. :-/

--
Magic depends on tradition and belief. It does not welcome observation,
nor does it profit by experiment. On the other hand, science is based
on experience; it is open to correction by observation and experiment.
Feb 6 '06 #23
Hi

vf***@talktalk.net wrote:
If I could find some software that worked for me then I would not need
to troll.


Thanks for the confirmation.

Welcome to my kill file.

*plonk*
Feb 6 '06 #24
"Daniel T." <po********@earthlink.net> wrote in
news:po******************************@news.east.ea rthlink.net:
In article <Xn*******************************@207.35.177.134> ,
Andre Kostur <nn******@kostur.net> wrote:
Then there is probably something you are failing to see. Can't see
the forest for the trees, and that sort of thing. Kindof a form of
tunnel vision where you are reading what you want to read, not what's
on the screen (note that this isn't a criticism or failing of you,
I'm sure quite a few of us have spent a long time (OK, probably the
first time you encounter it) trying to track down a compiler problem
which worked out to be a missing semicolon somewhere).


I remember once spending two weeks (at 40 hrs/week) tracking down an
error that resolved to a '2' in the code instead of a '4'. (It was
causing memory overwrites.) My boss was very unhappy, I'm glad I
didn't write the original code. :-/


My favourite is spending a day and a half trying to figure out why my
program was crashing when I was calling a 3rd party library. After large
amounts of frustration and finally resorting to printf's all over the
place (OK, this was originally in C, but is perfectly applicable to C++),
I found out that one of my pointers was NULL. So, as I was yelling to
myself "That pointer can't POSSIBLY be NULL!!! I check it for NULL right
THERE!" as I pointed to the following short code block:

if (ptr = NULL)
{
return;
}

I then proceeded to profusely swear at myself....... (this was before the
compiler would warn me about those sorts of accidental code
constructs....)
Feb 6 '06 #25
Victor Bazarov wrote:
The error is on the line 42 of your source code.

Just for the fun of it: what's behind the magic number 42?
It's now the 2nd time within a few days I've seen it.
Could I use my personal favorite 27 instead (smiling)?
Cheers, Stephan

Feb 6 '06 #26

"Stephan Brönnimann" <br****@hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Victor Bazarov wrote:
The error is on the line 42 of your source code.

Just for the fun of it: what's behind the magic number 42?
It's now the 2nd time within a few days I've seen it.
Could I use my personal favorite 27 instead (smiling)?
Cheers, Stephan


Check (or Google) "The Hitchhiker's Guide to the Galaxy". It's a _very_
important number! :-)

-Howard
Feb 6 '06 #27
Howard wrote:
"Stephan Brönnimann" <br****@hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Victor Bazarov wrote:
The error is on the line 42 of your source code.

Just for the fun of it: what's behind the magic number 42?
It's now the 2nd time within a few days I've seen it.
Could I use my personal favorite 27 instead (smiling)?
Cheers, Stephan


Check (or Google) "The Hitchhiker's Guide to the Galaxy". It's a _very_
important number! :-)


Thanks Howard, I got it. I've read all the books but I had to google
Stephan :-)

Feb 6 '06 #28
vf***@talktalk.net wrote:
I am only looking at the top error at this time (5 lines down)

$ make
g++ mytest.cpp -I ../src -L ../lib -o mytest.exe
/cygdrive/c/DOCUME~1/Daniel/LOCALS~1/Temp/ccZxZ4i6.o:mytest.cpp:(.text+0x492):
u
ndefined reference to
`audiere::NullAudioDevice::create(audiere::Paramet erList c
onst&)' [snipped] collect2: ld returned 1 exit status
make: *** [mytest] Error 1


I was in this thread for about 10 minutes wondering if ever you'd post
the compiler messages. Toghether with your statement "all the library
stuff is there" the problem is immediately clear after I see the
command line: You never link against the library.

Regards, Stephan

Feb 6 '06 #29
Andre Kostur wrote:
[story redacted]

if (ptr = NULL)
{
return;
}

I then proceeded to profusely swear at myself....... (this was before the
compiler would warn me about those sorts of accidental code
constructs....)


Reminds me of the very first piece of code I wrote as a professional (as
opposed to a student. This was back in '84, so it was C, not C++...

int index;
/* ... */
for (index = 0 ; index < NUM_ELEMS; ++index);
{
some_array[index].somefield = INITIAL_VALUE;
}

You could hear the swearing four corridors down when I finally found the
bug... :)

Feb 7 '06 #30
Howard wrote:
"Stephan Brönnimann" <br****@hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Victor Bazarov wrote:
The error is on the line 42 of your source code.

Just for the fun of it: what's behind the magic number 42?
It's now the 2nd time within a few days I've seen it.
Could I use my personal favorite 27 instead (smiling)?
Cheers, Stephan


Check (or Google) "The Hitchhiker's Guide to the Galaxy". It's a _very_
important number! :-)

-Howard


Perhaps as an alternative, we could tell people that they have errors on
lines 4, 8, 15, 16, 23, and 42?

Feb 7 '06 #31
So how do I link a file ? In this case say that I am including
"audiere.h" and in audiere.cpp there is a reference to device.cpp and
device.cpp is included at the top of audiere.cpp.

Feb 8 '06 #32
"In article <Xn*******************************@207.35.177.134> ,
Andre Kostur <nn******@kostur.net> wrote:
So far you've told the compiler to compile mytest.cpp, and to make an
executable. You've mentioned where your libraries are, but you haven't
told the compiler which libraries to use.


My guess is he never compiled the audiere library after he d/l'ed it
from sourceforge"

There are different versions of the source.
1 is does not compile withoug java, xpcom and VC6. At least that is if
you want to bind it to java and xpcom, VC6 I don't know. Another file
has the windows source and this already has executables and a lib file,
do I need to recompile this?

Feb 8 '06 #33
"Markus Moll
Feb 6, 6:45 pm show options

Thanks for the confirmation. "
How can your file welcome me? You use too many similies or labels,
talk in English! I don't understand what you are on about.

Feb 8 '06 #34
Link as in
g++ mytest.cpp -I ../src ../lib/audiere.lib -o mytest.exe
or
g++ mytest.cpp -I ../src -L ../lib/audiere.lib -o mytest.exe

neither of these worked there were still unresolved references.
I think the problem is that
there are includes off includes in this project and these are not being
linked.

Feb 8 '06 #35
"vf***@talktalk.net" <vf***@talktalk.net> wrote in
news:11*********************@g43g2000cwa.googlegro ups.com:
So how do I link a file ? In this case say that I am including
"audiere.h" and in audiere.cpp there is a reference to device.cpp and
device.cpp is included at the top of audiere.cpp.


Now you're getting beyond the scope of this newsgroup. Time to head over
to gnu.gcc.help for more detailed (and implementation-specific) answers to
your questions. comp.lang.c++ is for discussing the language itself. How
to use a specific compiler is better served in a newsgroup dedicated to
that compiler.
Feb 8 '06 #36
"Victor Bazarov wrote:
The error is on the line 42 of your source code.


Just for the fun of it: what's behind the magic number 42?
It's now the 2nd time within a few days I've seen it.
Could I use my personal favorite 27 instead (smiling)?
Cheers, Stephan "
42 is the answer to everything in the story, but if I remember
correctly it originates in from a game of scrabble. I guess Adams got
the idea from 41 which has some unusual mathematical properties. Phhh,
what the hell do I know anyway?

Feb 8 '06 #37

<vf***@talktalk.net> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
"Victor Bazarov wrote:
The error is on the line 42 of your source code.


Just for the fun of it: what's behind the magic number 42?
It's now the 2nd time within a few days I've seen it.
Could I use my personal favorite 27 instead (smiling)?
Cheers, Stephan "
42 is the answer to everything in the story, but if I remember
correctly it originates in from a game of scrabble. I guess Adams got
the idea from 41 which has some unusual mathematical properties. Phhh,
what the hell do I know anyway?


Umm.. no. Arther Dent got the question to the answer 42 from a game of
scrabble. Seems the earth was just a hugh computer built to find out what
the true question to the answer 42 was. Kinda funny actually, I won't say
what the true question was cause it's a spoiler, and people really should
read the Hitchhikers trilogy (with 4 books in it).
Feb 8 '06 #38
Well some people have turned that idea on its head, if they run a
simulation say like a climate model for a period of time and then look
at the difference between the climate model and the simulation then in
a way... like...

Feb 8 '06 #39
vf***@talktalk.net wrote:
"Victor Bazarov wrote:
The error is on the line 42 of your source code.

Just for the fun of it: what's behind the magic number 42?
It's now the 2nd time within a few days I've seen it.
Could I use my personal favorite 27 instead (smiling)?
Cheers, Stephan "
42 is the answer to everything in the story, but if I remember
correctly it originates in from a game of scrabble. I guess Adams got
the idea from 41 which has some unusual mathematical properties. Phhh,
what the hell do I know anyway?

"the hitchhikers guide to the galaxy" SF book carries
a story about a gigacomputer calculating the answer
to everything.
It tells them : 42.
When people complained about the answer, the computer
told them they should have asked the right question.
Feb 8 '06 #40
Maybe there should be two questions, that was the second. What was the
first?

Feb 8 '06 #41

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...
8
by: utab | last post by:
Dear all, I am getting an undefined reference error wrn I try to initilialize a static map in the class constructor. my map: map<string,vector<string> > m; and in the constructor ...
8
by: vfunc | last post by:
I get compile error: undefined reference to snd_pcm_format_width. I included the library directory with -I flag on gcc. #include <stdio.h> #include <stdlib.h> #include <string.h> #include...
1
by: yeah | last post by:
hi friends I tried to link c++ object files using "bfin-elf-ld" and got some undefined reference errors Errors::::: (.text+0x2ee8): undefined reference to `operator delete(void*)'...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
0
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...
0
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,...
1
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...
0
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...
0
muto222
php
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.