473,325 Members | 2,442 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,325 software developers and data experts.

multiply-defined problem


Dear everybody,

I trying to compile an aplication and i have got the following error
during
linking phase:

ld: fatal: symbol `K_MultiHandler_c::~K_MultiHandler_c #Nvariant 1()'
is multiply-defined:
(file type=FUNC; file (K_MultiHandler_class.o) type=FUNC);
it seems the include files contains the twice definitions for that
class.
But I cheked and i did not find it.

I'm working on
Solaris 2.8
Sun Studio 9

do you have some idea please ?

thanks
Antonio

Jun 21 '07 #1
3 3578
ADS7328 wrote:
Dear everybody,

I trying to compile an aplication and i have got the following error
during
linking phase:

ld: fatal: symbol `K_MultiHandler_c::~K_MultiHandler_c #Nvariant 1()'
is multiply-defined:
(file type=FUNC; file (K_MultiHandler_class.o) type=FUNC);
it seems the include files contains the twice definitions for that
class.
But I cheked and i did not find it.

I'm working on
Solaris 2.8
Sun Studio 9

do you have some idea please ?
If the destructor is defined _outside_ of the class definition, but
in a header, /and/ has no 'inline' specifier, then the compiler will
attempt to create two definitions of that function *if* the header
is included in more than one translation unit. Add 'inline' to it.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Jun 21 '07 #2


On Jun 21, 4:02 pm, "Victor Bazarov" <v.Abaza...@comAcast.netwrote:
ADS7328 wrote:
Dear everybody,
I trying to compile an aplication and i have got the following error
during
linking phase:
ld: fatal: symbol `K_MultiHandler_c::~K_MultiHandler_c #Nvariant 1()'
is multiply-defined:
(file type=FUNC; file (K_MultiHandler_class.o) type=FUNC);
it seems the include files contains the twice definitions for that
class.
But I cheked and i did not find it.
I'm working on
Solaris 2.8
Sun Studio 9
do you have some idea please ?

If the destructor is defined _outside_ of the class definition, but
in a header, /and/ has no 'inline' specifier, then the compiler will
attempt to create two definitions of that function *if* the header
is included in more than one translation unit. Add 'inline' to it.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask

Dear Victor,

you are right, that was the problem.
But the matter. if I put "inline" in class definition include file
for destructor i got the same error.

I must comment the destructor line into class definition in include
file
so I 'm able to compile the application.

Many thanks for everythings
ciao
Antonio

Jun 21 '07 #3
ADS7328 wrote:
On Jun 21, 4:02 pm, "Victor Bazarov" <v.Abaza...@comAcast.netwrote:
>ADS7328 wrote:
>>Dear everybody,
>>I trying to compile an aplication and i have got the following
error during
linking phase:
>>ld: fatal: symbol `K_MultiHandler_c::~K_MultiHandler_c #Nvariant
1()' is multiply-defined:
(file type=FUNC; file (K_MultiHandler_class.o) type=FUNC);
>>it seems the include files contains the twice definitions for
that class.
But I cheked and i did not find it.
>>I'm working on
Solaris 2.8
Sun Studio 9
>>do you have some idea please ?

If the destructor is defined _outside_ of the class definition, but
in a header, /and/ has no 'inline' specifier, then the compiler will
attempt to create two definitions of that function *if* the header
is included in more than one translation unit. Add 'inline' to it.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask


Dear Victor,

you are right, that was the problem.
But the matter. if I put "inline" in class definition include file
for destructor i got the same error.
Put it in front of the function _definition_, not declaration.
I must comment the destructor line into class definition in include
file
so I 'm able to compile the application.
Huh? Not sure what you mean. See FAQ 5.8.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Jun 21 '07 #4

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

Similar topics

4
by: Jim Red | last post by:
what is the best way to multiply a tuple or list by a given value exp. multiply (4, 5) by 2 => (8, 10) cheers jr
1
by: Zhang Le | last post by:
Hi, I did a small benchmark of matrix-vector multiply operation using Numeric module. I'm a bit suprised to find matrix*col-vector is much faster than row-vector*matrix. I wonder whether other...
2
by: Martin Pettersson | last post by:
Hi all, I'm trying to multiply parent values in xsl. The thing is that I start with a value down in the xml-structure. From that value (in my case 'qty' value) I check the parent value and later...
15
by: christopher diggins | last post by:
Here is some code I wrote for Matrix multiplication for arbitrary dimensionality known at compile-time. I am curious how practical it is. For instance, is it common to know the dimensionality of...
388
by: maniac | last post by:
Hey guys, I'm new here, just a simple question. I'm learning to Program in C, and I was recommended a book called, "Mastering C Pointers", just asking if any of you have read it, and if it's...
2
by: Pallav | last post by:
I'm trying to convert some source code containing floating point into fixed-point arithmetic. I am having some trouble understanding fixed point signed multiply. I have a 18.14 base integer with...
5
by: per.nordlow | last post by:
Hey there! I want to multiply/divide (shift) a float with variable containing a power-of-two value: 2, 4, 8, 16, .... Is there such a function in the C standard library or the glibc library...
4
by: trint | last post by:
Why do we have to use decimal.multiply to multiply two intgers? I just want to multiply these two values: int oneThousand = 1000; int watCHTimer1 = value from a textbox; Thanks, Trint
11
by: vips | last post by:
I have a string str="10*12*14" now I want the total of this value i.e. 10 multiply 12 multiply 14 how do i get it ? is there any function in vb.net to do that ?? if i put it as query to...
12
by: Janaka Perera | last post by:
Hi All, We have done a object oriented design for a system which will create a class multiply inherited by around 1000 small and medium sized classes. I would be greatful if you can help me...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.