FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour LINK ERROR: 19.09
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
LINK ERROR: 19.09
Posted: Thu Oct 17, 2019 10:55 PM

When building my application ( Microsoft Visual Studio most recent version, FWH most recent version ). I get the following errors:
hbct.lib(trig.obj) : error LNK2005: _HB_FUN_ACOS already defined in g_server.obj
hbct.lib(trig.obj) : error LNK2005: _HB_FUN_ASIN already defined in g_server.obj
hbct.lib(trig.obj) : error LNK2005: _HB_FUN_COS already defined in g_server.obj
hbct.lib(trig.obj) : error LNK2005: _HB_FUN_COT already defined in g_server.obj
hbct.lib(trig.obj) : error LNK2005: _HB_FUN_PI already defined in g_server.obj
hbct.lib(trig.obj) : error LNK2005: _HB_FUN_SIN already defined in g_server.obj
hbct.lib(trig.obj) : error LNK2005: _HB_FUN_TAN already defined in g_server.obj
aMLS11.exe : fatal error LNK1169: one or more multiply defined symbols found

This is new to this version and has not surfaced for the years I have been assembling this program.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: LINK ERROR: 15.09
Posted: Fri Oct 18, 2019 06:18 AM

Tim,

You have to link hbct.lib from Harbour

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: LINK ERROR: 15.09
Posted: Fri Oct 18, 2019 12:06 PM
No, those symbols are already defined, not undefined. What is g_server.obj and why it (re)defines those arithmetic functions?

EMG
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: LINK ERROR: 15.09
Posted: Fri Oct 18, 2019 01:22 PM

seem g_server... google server... class of Cristobal ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: LINK ERROR: 15.09
Posted: Fri Oct 18, 2019 02:51 PM

Enrico,

Very good observation, thanks :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: LINK ERROR: 15.09
Posted: Fri Oct 18, 2019 05:54 PM
Silvio.Falconi wrote:seem g_server... google server... class of Cristobal ?

No class or module of mine is called that.
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: LINK ERROR: 19.09
Posted: Fri Oct 18, 2019 09:03 PM

G_SERVER is a graph generating program I have used since 2004, and linked in with every single build of FWH --- until 15.09

G_SERVER and G_GRAPH were provided through GNU library to FW users. * Copyright 2002 David Arturo Macias Corona <dmacias@mail.udg.mx>

It has worked fine for me.

Suddenly something is different in 19.09, the latest release, which provides this error.

I cannot build my application until this is resolved. Some insight would be appreciated.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 375
Joined: Tue Feb 10, 2015 09:48 AM
Re: LINK ERROR: 19.09
Posted: Sat Oct 19, 2019 06:19 AM
you can add /FORCE to linker, if you use hbmk2 the syntax should be -ldflag=/LINK, the best solution is comment out the duplicated functions from g_server.prg if you have the source.
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: LINK ERROR: 19.09
Posted: Sat Oct 19, 2019 05:38 PM

I did comment out the functions in G_Server and the graphs seem to work ... but maybe I need a different approach to graphs now.

What graphing functions are available in FWH 19.09 now that are working well ? ( I hate to think of rewriting a bunch of graphs ... but ...

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: LINK ERROR: 19.09
Posted: Sat Oct 19, 2019 08:31 PM

FWH was using the trigonometric functions PI(),COS(),SIN(), etc for a very long time in classes TGraph, XImage and Tselector. Probably you might have never used any of these classes in your programs. Had you used any of these classes, you would have faced this issue with earlier versions also.

In the current version imgtxtio.prg uses these functions for the first time and this module is compulsorily linked with all applications. That is the reason you faced this issue now.

FWH1909 introduced new charting functions for display, printing and also for the generation of PDFs. We will soon be introducing these functions by postings in the forums, but for now, you can see

viewtopic.php?f=3t=37819

If gserver library is providing more features, you are welcome to suggest and we will try to provide them soon.

&

Regards



G. N. Rao.

Hyderabad, India
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: LINK ERROR: 19.09
Posted: Sun Oct 20, 2019 07:50 PM

Thank you for the explanation. I will work to eliminate using the old graphs and focus on FWH only. My graphs were very basic

Sent from my iPhone using Tapatalk

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 169
Joined: Mon Feb 25, 2008 02:42 AM
Re: LINK ERROR: 19.09
Posted: Mon Oct 28, 2019 10:19 PM

Please try :

In the Project’s Settings, add /FORCE:MULTIPLE to the Linker’s Command Line options.

From MSDN: "Use /FORCE:MULTIPLE to create an output file whether or not LINK finds more than one definition for a symbol."

regards
fafi

Continue the discussion