473,396 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Need help on this error

Neo
I have a setup like
class A {
virtual void func1()=0;
.....
}
class B {
virtual void func2()=0;
....
}
class C: public A, public B {
virtual void func1()=0;
virtual void func2()=0;
....
}

where below class C is "bidir_chan"

g++ -O3 -Wall -I. -I.. -I../../../include -L. -L.. -L../../../lib-linux
-o run.x bidir_chan.o addr_generator.o main.o -lsystemc -lm 2>&1 |
c++filt
bidir_chan.o:bidir_chan.cpp:(.rdata$_ZTV10bidir_ch an[vtable for
bidir_chan]+0x20): undefined reference to `bidir_chan::~bidir_chan()'
bidir_chan.o:bidir_chan.cpp:(.rdata$_ZTV10bidir_ch an[vtable for
bidir_chan]+0x24): undefined reference to `bidir_chan::~bidir_chan()'
bidir_chan.o:bidir_chan.cpp:(.rdata$_ZTV10bidir_ch an[vtable for
bidir_chan]+0x50): undefined reference to `non-virtual thunk to
bidir_chan::~bidir_chan()'
bidir_chan.o:bidir_chan.cpp:(.rdata$_ZTV10bidir_ch an[vtable for
bidir_chan]+0x54): undefined reference to `non-virtual thunk to
bidir_chan::~bidir_chan()'
collect2: ld returned 1 exit status
what is this THUNK thing? I am using cygwin g++ ver 3.4.4-2

thanks for any hep,
Neo

Dec 6 '06 #1
6 4289
On Dec 6, 11:14 am, "Neo" <zingafri...@yahoo.comwrote:
I have a setup like
class A {
virtual void func1()=0;
....}

class B {
virtual void func2()=0;
...}

class C: public A, public B {
virtual void func1()=0;
virtual void func2()=0;
...

}
where below class C is "bidir_chan"

Are you trying to instanciate C? You can't instanciate classes with
pure virtual functions. Either remove the '=0' from the method
declarations in class C and later provide a definition, or create a new
class D deriving from C which implements func1() and func2().

--
Erik Wikström

Dec 6 '06 #2

"""Neo ÐÉÓÁÌ(Á):
"""
I have a setup like
class A {
virtual void func1()=0;
....
}
class B {
virtual void func2()=0;
...
}
class C: public A, public B {
virtual void func1()=0;
virtual void func2()=0;
...
}

where below class C is "bidir_chan"

g++ -O3 -Wall -I. -I.. -I../../../include -L. -L.. -L../../../lib-linux
-o run.x bidir_chan.o addr_generator.o main.o -lsystemc -lm 2>&1 |
c++filt
bidir_chan.o:bidir_chan.cpp:(.rdata$_ZTV10bidir_ch an[vtable for
bidir_chan]+0x20): undefined reference to `bidir_chan::~bidir_chan()'
bidir_chan.o:bidir_chan.cpp:(.rdata$_ZTV10bidir_ch an[vtable for
bidir_chan]+0x24): undefined reference to `bidir_chan::~bidir_chan()'
bidir_chan.o:bidir_chan.cpp:(.rdata$_ZTV10bidir_ch an[vtable for
bidir_chan]+0x50): undefined reference to `non-virtual thunk to
bidir_chan::~bidir_chan()'
bidir_chan.o:bidir_chan.cpp:(.rdata$_ZTV10bidir_ch an[vtable for
bidir_chan]+0x54): undefined reference to `non-virtual thunk to
bidir_chan::~bidir_chan()'
collect2: ld returned 1 exit status
what is this THUNK thing? I am using cygwin g++ ver 3.4.4-2

thanks for any hep,
Neo

http://magegame.ru/?rf=626f6764616e

Dec 6 '06 #3

"""Neo ÐÉÓÁÌ(Á):
"""
I have a setup like
class A {
virtual void func1()=0;
....
}
class B {
virtual void func2()=0;
...
}
class C: public A, public B {
virtual void func1()=0;
virtual void func2()=0;
...
}

where below class C is "bidir_chan"

g++ -O3 -Wall -I. -I.. -I../../../include -L. -L.. -L../../../lib-linux
-o run.x bidir_chan.o addr_generator.o main.o -lsystemc -lm 2>&1 |
c++filt
bidir_chan.o:bidir_chan.cpp:(.rdata$_ZTV10bidir_ch an[vtable for
bidir_chan]+0x20): undefined reference to `bidir_chan::~bidir_chan()'
bidir_chan.o:bidir_chan.cpp:(.rdata$_ZTV10bidir_ch an[vtable for
bidir_chan]+0x24): undefined reference to `bidir_chan::~bidir_chan()'
bidir_chan.o:bidir_chan.cpp:(.rdata$_ZTV10bidir_ch an[vtable for
bidir_chan]+0x50): undefined reference to `non-virtual thunk to
bidir_chan::~bidir_chan()'
bidir_chan.o:bidir_chan.cpp:(.rdata$_ZTV10bidir_ch an[vtable for
bidir_chan]+0x54): undefined reference to `non-virtual thunk to
bidir_chan::~bidir_chan()'
collect2: ld returned 1 exit status
what is this THUNK thing? I am using cygwin g++ ver 3.4.4-2

thanks for any hep,
Neo

http://magegame.ru/?rf=626f6764616e

Dec 6 '06 #4

"bogdan" <bo****@birulevo.netwrote in message
news:11**********************@16g2000cwy.googlegro ups.com...
>

http://magegame.ru/?rf=626f6764616e
If you've got something to say, say it. I'm not about to click on an
unknown link.
Dec 6 '06 #5
Neo
Are you trying to instanciate C? You can't instanciate classes with
pure virtual functions. Either remove the '=0' from the method
declarations in class C and later provide a definition, or create a new
class D deriving from C which implements func1() and func2().

--
Erik Wikström
I am sorry, there is a correction, I have another class D(which is
bidir_chan) which implements those functions of class C and is inturn
instantiated.

Dec 7 '06 #6

"Neo" <zi*********@yahoo.comwrote in message
news:11*********************@79g2000cws.googlegrou ps.com...
Are you trying to instanciate C? You can't instanciate classes with
pure virtual functions. Either remove the '=0' from the method
declarations in class C and later provide a definition, or create a new
class D deriving from C which implements func1() and func2().

--
Erik Wikstrvm
I am sorry, there is a correction, I have another class D(which is
bidir_chan) which implements those functions of class C and is inturn
instantiated.
If you're still having a problem, then show the actual code you're referring
to. We can't help you resolve the problem if we're only going by a vague
description.

-Howard
Dec 7 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: mike | last post by:
Hello, After trying to validate this page for a couple of days now I was wondering if someone might be able to help me out. Below is a list of snippets where I am having the errors. 1. Line 334,...
8
by: Bshealey786 | last post by:
Okay im doing my final project for my first computer science class(its my major, so it will be my first of many), but anyway im a beginner so im not to great with C++ yet. Anyway this is the error...
3
by: Drewdog | last post by:
I am getting some error messages which I can't figure out their meaning. I have the code setup, I think it's correct but it doesn't work. My goal is to get this program to read from a data file and...
1
by: Peggy Go | last post by:
Hi! I've downloaded postgreqsql-base-7.2.4.tar.gz but it says in the readme file that "This distribution also contains several language bindings, including C, Perl, Python, and Tcl, as well as a...
8
by: frank | last post by:
Below is some code for doing and insert into one of my tables. The inserts do not work because a duplicate key exists, which I want to happen. The problem is, I cannot get access to return an error...
2
by: CSDunn | last post by:
Hello, I need some assistance with error handling in an Access 2003 Project form. The project is has a data source connection to a SQL Server 2000 database. The main form is named...
106
by: xtra | last post by:
Hi Folk I have about 1000 procedures in my project. Many, many of them are along the lines of function myfuntion () as boolean on error goto er '- Dim Dbs as dao.database Dim Rst as...
5
by: Greg Collins [MVP] | last post by:
I have an ASP.NET page that uses a tag: <asp:Xml id="foo" runat="server" DocumentSource="rss.xml" TransformSource="rss20.xsl" /> This creates a Web page from an XML file that was generated by...
12
by: Noel | last post by:
Hello, I'm currently developing a web service that retrieves data from an employee table. I would like to send and retrieve a custom employee class to/from the webservice. I have currently coded...
5
by: Chuck Anderson | last post by:
I run Apache 2.0.55, and Php (both 4.4.1 and 5.2.5) on my home PC (Windows XP). One of the scripts that I run daily needs to access a secure URL (https://..............). When I am running Php4,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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,...

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.