undefined reference error/g++-6

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

 



Hi,
I am running g++-6 in UBuntu 16.04. I'm using open-source library to
develop my application.


In the third part library, there is only DTOR and no copy CTOR and
copy assignment.
So I created copy CTOR. The open source library is compiled.

Now I am trying to compile my application. It gives error.

g++-6 test2.cc -lfluid_msg -o test2 -g -fsanitize=address
/tmp/ccEKzcOk.o: In function
`fluid_msg::of10::PacketOut::PacketOut(fluid_msg::of10::PacketOut
const&)':
/usr/local/include/fluid/of10msg.hh:230: undefined reference to
`fluid_msg::PacketOutCommon::PacketOutCommon(fluid_msg::PacketOutCommon
const&)'
collect2: error: ld returned 1 exit status

I dont know why? When compiler creates automatically, it works. It
means when I remove the copy CTOR, compilation goes well.

I wish to know what is problem in linking? may be becasue of
inheritance and copy CTOR.??  PacketOut is inherited from
PacketOutCommon. I declare and defined copy CTOR in PacketOutCommon.
For PacketOut, compiler creates itself.

any help to solve the problem!

Thanks



[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