Link Errors

Post Reply
MichaelMo
Posts: 55
Joined: Thu Feb 15, 2007 1:35 am

Link Errors

Post by MichaelMo »

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
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Link Errors

Post by cnavarro »

C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Link Errors

Post by nageswaragunupudi »

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
MichaelMo
Posts: 55
Joined: Thu Feb 15, 2007 1:35 am

Re: Link Errors

Post by MichaelMo »

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?
MichaelMo
Posts: 55
Joined: Thu Feb 15, 2007 1:35 am

Re: Link Errors

Post by MichaelMo »

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?
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Link Errors

Post by nageswaragunupudi »

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: Select all

      ::cFile     = TrueName( ::cFile )
This works perfectly.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Link Errors

Post by nageswaragunupudi »

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
MichaelMo
Posts: 55
Joined: Thu Feb 15, 2007 1:35 am

Re: Link Errors

Post by MichaelMo »

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
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Link Errors

Post by nageswaragunupudi »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Link Errors

Post by Antonio Linares »

Michael,

Have you upgraded your Harbour too ?

https://bitbucket.org/fivetech/harbour- ... 160309.zip
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply