FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Link Errors
Posts: 55
Joined: Thu Feb 15, 2007 01:35 AM
Link Errors
Posted: Tue Nov 08, 2016 06:58 AM

I'm upgrading from a very old copy of Fivewin/Harbour to the October 16th version. The application seems to compile just fine in Harbour 3.2, the new version of FWH and BCC7, but I'm getting the following link error when I try to compile. What am I missing?

Turbo Incremental Link 6.70 Copyright (c) 1997-2014 Embarcadero Technologies, Inc.
Error: Unresolved external '_HB_FUN_HB_GETFILESINZIP' referenced from C:\FWH\LIB\FIVEH.LIB|OLEFUNCS
Error: Unresolved external '_HB_FUN_HB_UNZIPOPEN' referenced from C:\FWH\LIB\FIVEH.LIB|OLEFUNCS
Error: Unresolved external '_HB_FUN_HB_UNZIPFILEFIRST' referenced from C:\FWH\LIB\FIVEH.LIB|OLEFUNCS
Error: Unresolved external '_HB_FUN_HB_UNZIPFILEINFO' referenced from C:\FWH\LIB\FIVEH.LIB|OLEFUNCS
Error: Unresolved external '_HB_FUN_HB_UNZIPFILEOPEN' referenced from C:\FWH\LIB\FIVEH.LIB|OLEFUNCS
Error: Unresolved external '_HB_FUN_HB_UNZIPFILEREAD' referenced from C:\FWH\LIB\FIVEH.LIB|OLEFUNCS
Error: Unresolved external '_HB_FUN_HB_UNZIPFILECLOSE' referenced from C:\FWH\LIB\FIVEH.LIB|OLEFUNCS
Error: Unresolved external '_HB_FUN_HB_UNZIPFILENEXT' referenced from C:\FWH\LIB\FIVEH.LIB|OLEFUNCS
Error: Unresolved external '_HB_FUN_HB_UNZIPCLOSE' referenced from C:\FWH\LIB\FIVEH.LIB|OLEFUNCS
Error: Unresolved external 'SHCreateDirectoryExA' referenced from C:\FWH\LIB\FIVEHC.LIB|MKDIR
Error: Unresolved external 'SHCreateDirectoryExW' referenced from C:\FWH\LIB\FIVEHC.LIB|MKDIR
Error: Unresolved external '_HB_FUN_CURDRIVE' referenced from C:\32BIT\OCW\RELEASE\SYSTEM.OBJ
Error: Unable to perform link

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Link Errors
Posted: Tue Nov 08, 2016 07:14 AM
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: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Link Errors
Posted: Tue Nov 08, 2016 09:27 AM

Simple Thumb Rule:

Please see \fwh\samples\buildh.bat and buildx.bat.

If you are building application with Harbour, include in your link script all the libs listed in buildh.bat and if you are using xHarbour, all the libs listed in buildx.bat.

You may keep checking for any changes in these two bat files while upgrading to any new version.

Regards



G. N. Rao.

Hyderabad, India
Posts: 55
Joined: Thu Feb 15, 2007 01:35 AM
Re: Link Errors
Posted: Thu Nov 10, 2016 03:00 AM

Thanks for everyone's help by the way. Sorry for not responding sooner, but I've been a bit preoccupied. I went through the buildh file list of various libs and I added a number of missing libs for Fivewin, Harbour, and Borland. That took care of 12 of the 13 missing references, but I'm still getting one unresolved reference:

Error: Unresolved external '_HB_FUN_CURDRIVE' referenced from C:\32BIT\OCW\DEBUG\SYSTEM.OBJ

I believe it's coming from this Harbour function call:

GetCurrentDirectory()

Any idea why it still won't find that function?

Posts: 55
Joined: Thu Feb 15, 2007 01:35 AM
Re: Link Errors
Posted: Thu Nov 10, 2016 04:14 AM

Well, apparently addiing hbxpp.lib to the list of harbour libs took care of that GetCurrentDirectory problem, but......

The application now compiles just fine, but when I try to open up a TDatabase file, I'm getting a Warning box that pops up that says:

Warning:

Truename not finished

I then get an error base/44 assigned value is wrong class: TDatabase:cFile

I've never seen anything like that before. What the heck?

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Link Errors
Posted: Thu Nov 10, 2016 04:31 AM
TrueName() is a function.

TrueName( cRelativePath ) --> cFullPath

Example:
if current directory is c:\fwh\samples, then

? TrueName( "customer.dbf" ) // --> "c:\fwh\samples\customer.dbf"

This function is also used in TDatabase like this

Code (fw): Select all Collapse
      ::cFile     = TrueName( ::cFile )

This works perfectly.
Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Link Errors
Posted: Thu Nov 10, 2016 04:42 AM
MichaelMo wrote:Thanks for everyone's help by the way. Sorry for not responding sooner, but I've been a bit preoccupied. I went through the buildh file list of various libs and I added a number of missing libs for Fivewin, Harbour, and Borland. That took care of 12 of the 13 missing references, but I'm still getting one unresolved reference:

Error: Unresolved external '_HB_FUN_CURDRIVE' referenced from C:\32BIT\OCW\DEBUG\SYSTEM.OBJ

I believe it's coming from this Harbour function call:

GetCurrentDirectory()

Any idea why it still won't find that function?


This is my opinion:

1) C:\32BIT\OCW\DEBUG\SYSTEM.OBJ is not a module from FWH libraries. May be you are using some additional library or prg file.
2) FWH libraires never used the function GetCurrentDirectory(). This usage must be from an external library or prg file you have linked.
3) CURDRIVE() is available in xHarbour but not in Harbour. In Harbour it is HB_CURDRIVE(). Probably use are linking an external program by name "system.prg", which was written for xHarbour using the functions GetCurrentDirectory and/or CURDRIVE.

Please remove the new lib added and revise the external program included in the link script.
Regards



G. N. Rao.

Hyderabad, India
Posts: 55
Joined: Thu Feb 15, 2007 01:35 AM
Re: Link Errors
Posted: Thu Nov 10, 2016 04:59 AM
nageswaragunupudi wrote:TrueName() is a function.


If so, it's one that I'm never calling directly. The offending code looks like this:

use ars_data new

if (!neterr())

set index to ars_com, ars_acc
DATABASE oDbfParent

endif
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Link Errors
Posted: Thu Nov 10, 2016 05:06 AM

There is nothing wrong with your usage or with TDatabase class.
Please go through my post above in detail

Regards



G. N. Rao.

Hyderabad, India
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Link Errors
Posted: Thu Nov 10, 2016 08:42 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion