Re: undefined reference, plz help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Brian Budge wrote:
On Wed, Jun 8, 2011 at 9:26 PM, eric lin<ericlin@xxxxxxxxxxxxx>  wrote:
Dear gcc programers:

  what may cause compile error (on 4.5.2 or maybe not)
------
  g++ pg49.cpp
/tmp/ccUvNoPf.o: In function `main':
pg49.cpp:(.text+0x42): undefined reference to `IntArray::IntArray(int*, int)'
pg49.cpp:(.text+0x5e): undefined reference to `IntArrayRC::IntArrayRC(int*, int)'
/tmp/ccUvNoPf.o: In function `IntArray::~IntArray()':
pg49.cpp:(.text._ZN8IntArrayD2Ev[_ZN8IntArrayD5Ev]+0xb): undefined reference to `vtable for IntArray'
/tmp/ccUvNoPf.o: In function `IntArrayRC::~IntArrayRC()':
pg49.cpp:(.text._ZN10IntArrayRCD2Ev[_ZN10IntArrayRCD5Ev]+0xb): undefined reference to `vtable for IntArrayRC'
collect2: ld returned 1 exit status
--------
eric  /* I am happy to supply code I compiled, plz show up your private email address or email me privately */




This means that you've declared, but not defined those constructors.
At link time, the linker cannot find the code for those functions.

   Brian

Actually, this means that you have no business writing code at all since you can't use english instead of AIM syntax in these emails. Do you say "LOL" out loud? Do you say "plz" out loud? The next time you ask for information, DO NOT use these types of terms, type out the words with full verbosity.

My apologies to the rest of this list but these kinds of things really get to me, using those things where they are not required or desired.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux