Hi, This looks just like a C++ error. Check solution for: https://stackoverflow.com/questions/3065154/undefined-reference-to-vtable <https://stackoverflow.com/questions/3065154/undefined-reference-to-vtable>
Regards, Oscar > On 15 Jul 2017, at 17:47, Neu, Markus <m....@campus.tu-berlin.de> wrote: > > Hallo, > > at the moment i try to add a additional port to the cache.cc/.hh > <http://cache.cc/.hh>. The idea is to send a copy of the packets to a new > module. > I use a example from: learning.gem5.org/book/part2/memoryobject.html > <http://learning.gem5.org/book/part2/memoryobject.html> as template for the > port implementation. Now i have reached a point were the syntax generates no > more problems. But the compiler stops with errors: > > > build/X86/mem/cache/lib.o.partial: In function > `Cache::DapuSidePort::DapuSidePort(std::__cxx11::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&, Cache*)': > /home/osboxes/gem5_raw/build/X86/mem/cache/cache.hh:204: undefined reference > to `vtable for Cache::DapuSidePort' > build/X86/mem/cache/lib.o.partial: In function > `Cache::DapuSidePort::~DapuSidePort()': > /home/osboxes/gem5_raw/build/X86/mem/cache/cache.hh:190: undefined reference > to `vtable for Cache::DapuSidePort' > /home/osboxes/gem5_raw/build/X86/mem/cache/cache.hh:190: undefined reference > to `vtable for Cache::DapuSidePort' > build/X86/exposed_obj/lib.o.partial: In function > `Dapu::CPUSidePort::CPUSidePort(std::__cxx11::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&, Dapu*)': > /home/osboxes/gem5_raw/build/X86/exposed_obj/Dapu.hh:43: undefined reference > to `vtable for Dapu::CPUSidePort' > /home/osboxes/gem5_raw/build/X86/exposed_obj/Dapu.hh:43: undefined reference > to `vtable for Dapu::CPUSidePort' > build/X86/exposed_obj/lib.o.partial: In function > `Dapu::CPUSidePort::~CPUSidePort()': > /home/osboxes/gem5_raw/build/X86/exposed_obj/Dapu.hh:25: undefined reference > to `vtable for Dapu::CPUSidePort' > /home/osboxes/gem5_raw/build/X86/exposed_obj/Dapu.hh:25: undefined reference > to `vtable for Dapu::CPUSidePort' > /home/osboxes/gem5_raw/build/X86/exposed_obj/Dapu.hh:25: undefined reference > to `vtable for Dapu::CPUSidePort' > build/X86/exposed_obj/lib.o.partial:/home/osboxes/gem5_raw/build/X86/exposed_obj/Dapu.hh:25: > more undefined references to `vtable for Dapu::CPUSidePort' follow > collect2: error: ld returned 1 exit status > scons: *** [build/X86/gem5.opt] Error 1 > > > The gem5 version which i use is from today but the template seems to be much > older. The error massages point to the constructor and class definitions: > > > Dapu.hh:25 --> class CPUSidePort : public SlavePort > > Dapu.hh:43 -->CPUSidePort(const std::string& name, Dapu *owner) : > SlavePort(name, owner), owner(owner), > needRetry(false), > blockedPacket(nullptr) > { } > > > Unfortunately i don't understand what the compiler indicates but would assume > a missing library. I would appreciate some hints. > > Regards, > Markus Neu > _______________________________________________ > gem5-users mailing list > gem5-users@gem5.org <mailto:gem5-users@gem5.org> > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users > <http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users>
_______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users