FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour MSVC link sequence
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
MSVC link sequence
Posted: Fri Jul 15, 2011 03:42 AM
I'm dumping MingW to the side for the time being. Couldn't get it to work, so back to MSVC++ 2010 Express.

I got old or modified version of fwh sources in myfunc.lib which always got linked before fwh libs. What got me mystified is it always linked-in objects from FWH libs instead of mine. Why and how to solve this?

TIA

p.s. Found similar post on Harbour's mailing list
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: MSVC link sequence
Posted: Fri Jul 15, 2011 01:10 PM

Hua,

Please place a "extern ClassName, ..." at the beginning of your main app PRG, this should be enough to require the linker to use your libs Classes instead of the ones required from FWH itself.

Usually this happens when a linker links based on requirements (external references) instead of the availability order :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: MSVC link sequence
Posted: Fri Jul 15, 2011 01:23 PM

I see, thanks Antonio. That's new to me as I've never used anything other than BCC before :). I'll get back to playing with MingW and MSVC later. Trying to understand hbmk2 now as it seems very useful.

Is there no alternative apart from declaring 'external'?. Is it the same with MingW as I would much prefer using MingW than MSVC.

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour

Continue the discussion