Link Errors

Link Errors

Postby MichaelMo » Tue Nov 08, 2016 6: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
MichaelMo
 
Posts: 55
Joined: Thu Feb 15, 2007 1:35 am

Re: Link Errors

Postby cnavarro » Tue Nov 08, 2016 7: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
User avatar
cnavarro
 
Posts: 6500
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Link Errors

Postby nageswaragunupudi » Tue Nov 08, 2016 9: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
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Link Errors

Postby MichaelMo » Thu Nov 10, 2016 3: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?
MichaelMo
 
Posts: 55
Joined: Thu Feb 15, 2007 1:35 am

Re: Link Errors

Postby MichaelMo » Thu Nov 10, 2016 4: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?
MichaelMo
 
Posts: 55
Joined: Thu Feb 15, 2007 1:35 am

Re: Link Errors

Postby nageswaragunupudi » Thu Nov 10, 2016 4: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: Select all  Expand view
     ::cFile     = TrueName( ::cFile )

This works perfectly.
Regards

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

Re: Link Errors

Postby nageswaragunupudi » Thu Nov 10, 2016 4: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
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Link Errors

Postby MichaelMo » Thu Nov 10, 2016 4: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
MichaelMo
 
Posts: 55
Joined: Thu Feb 15, 2007 1:35 am

Re: Link Errors

Postby nageswaragunupudi » Thu Nov 10, 2016 5: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
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Link Errors

Postby Antonio Linares » Thu Nov 10, 2016 8:42 am

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 74 guests