Page 1 of 1

LINK ERROR: 19.09

Posted: Thu Oct 17, 2019 10:55 pm
by TimStone
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.

Re: LINK ERROR: 15.09

Posted: Fri Oct 18, 2019 6:18 am
by Antonio Linares
Tim,

You have to link hbct.lib from Harbour

Re: LINK ERROR: 15.09

Posted: Fri Oct 18, 2019 12:06 pm
by Enrico Maria Giordano
No, those symbols are already defined, not undefined. What is g_server.obj and why it (re)defines those arithmetic functions?

EMG

Re: LINK ERROR: 15.09

Posted: Fri Oct 18, 2019 1:22 pm
by Silvio.Falconi
seem g_server... google server... class of Cristobal ?

Re: LINK ERROR: 15.09

Posted: Fri Oct 18, 2019 2:51 pm
by Antonio Linares
Enrico,

Very good observation, thanks :-)

Re: LINK ERROR: 15.09

Posted: Fri Oct 18, 2019 5:54 pm
by cnavarro
Silvio.Falconi wrote:seem g_server... google server... class of Cristobal ?
No class or module of mine is called that.

Re: LINK ERROR: 19.09

Posted: Fri Oct 18, 2019 9:03 pm
by TimStone
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.

Re: LINK ERROR: 19.09

Posted: Sat Oct 19, 2019 6:19 am
by AntoninoP
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.

Re: LINK ERROR: 19.09

Posted: Sat Oct 19, 2019 5:38 pm
by TimStone
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 ...

Re: LINK ERROR: 19.09

Posted: Sat Oct 19, 2019 8:31 pm
by nageswaragunupudi
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
http://forums.fivetechsupport.com/viewt ... =3&t=37819

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

Re: LINK ERROR: 19.09

Posted: Sun Oct 20, 2019 7:50 pm
by TimStone
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

Re: LINK ERROR: 19.09

Posted: Mon Oct 28, 2019 10:19 pm
by fafi
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