Which option decides about linking functions from library..

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
mol
Posts: 3825
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Which option decides about linking functions from library..

Post 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
User avatar
mol
Posts: 3825
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

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

Post by mol »

I'm refreshing this topic...
Roberto, maybe you will know, how to do it...
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

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

Post 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...
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
mol
Posts: 3825
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

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

Post 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
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

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

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

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

Post by Rathinagiri »

IMHO, you can re-create libhbrtl without GETAPPLYKEY function.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
mol
Posts: 3825
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

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

Post 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?
Post Reply