Page 1 of 1

Which option decides about linking functions from library..

Posted: Wed Jan 20, 2010 1:52 pm
by mol
Hi!
I need to recompile my old clipper5 project with harbour
I want to "cover" function GetApplyKey defined in library libhbrtl.a with my function.
But, an error occurs:

Code: Select all

C:/hmg/harbour/lib/libhbrtl.a(getsys.o):getsys.c:(.text+0xdf0): multiple definition of `HB_FUN_GETAPPLYKEY'
Do anybody know, how to link my own function, not this one from library?

Best regards, Marek

Re: Which option decides about linking functions from library..

Posted: Wed Jan 20, 2010 5:24 pm
by mol
I'm refreshing this topic...
Roberto, maybe you will know, how to do it...

Re: Which option decides about linking functions from library..

Posted: Wed Jan 20, 2010 6:46 pm
by Roberto Lopez
mol wrote:I'm refreshing this topic...
Roberto, maybe you will know, how to do it...
Sorry, I'm not sure about what do you want to do...

Re: Which option decides about linking functions from library..

Posted: Wed Jan 20, 2010 8:39 pm
by mol
I've created my own GETAPPLYKEY function, which is already system function placed in libhbrtl.a.
With clipper - I've got an message about duplicate definition of this function.

With HMG, error occurs and no .exe file is built.

I'll try to places a sample tomorrow...

Thanks, Marek

Re: Which option decides about linking functions from library..

Posted: Wed Jan 20, 2010 10:06 pm
by Roberto Lopez
mol wrote:I've created my own GETAPPLYKEY function, which is already system function placed in libhbrtl.a.
With clipper - I've got an message about duplicate definition of this function.

With HMG, error occurs and no .exe file is built.

I'll try to places a sample tomorrow...

Thanks, Marek
Ok. I understand now.

This can be easily tested.

You only must to add a an empty function using a system function name (ie: function alert() ; return).

As you've said no error arises.

I'm almost sure that this is Harbour/hbmk2 related (not HMG specific).

You should test it in a clean/standard Harbour installation with a console test to confirm it.

Re: Which option decides about linking functions from library..

Posted: Thu Jan 21, 2010 6:42 am
by mol
OK, thanks

Re: Which option decides about linking functions from library..

Posted: Thu Jan 21, 2010 7:19 am
by Rathinagiri
IMHO, you can re-create libhbrtl without GETAPPLYKEY function.

Re: Which option decides about linking functions from library..

Posted: Thu Jan 21, 2010 7:22 am
by mol
It must be an option to point which function must be taken first and if error or warning only is generate...

Maybe something with error severity level?