FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour To Antonio or Rao: Linking errors
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
To Antonio or Rao: Linking errors
Posted: Mon Sep 23, 2013 04:02 AM
Guys:

I'm compiling a program that use the Hb_ZIPFILE function and I'm getting linking errors when compiling with buildx.bat. IF I use the xBuild Project Builder it links with no problems.
Errors:
Code (fw): Select all Collapse
Generating C source output to 'CONVDEPT.c'...
Done.
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
CONVDEPT.c:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external 'std::_String_base::_Xran() const' referenced from C:\XHARBOURB\LIB\HBZIP.LIB|zipstorage
Error: Unresolved external 'std::_String_base::_Xlen() const' referenced from C:\XHARBOURB\LIB\HBZIP.LIB|zipstorage
Error: Unresolved external 'std:::id::_Id_cnt' referenced from C:\XHARBOURB\LIB\HBZIP.LIB|zipstring
Error: Unresolved external 'std:::_Getfacet(unsigned int) const' referenced from C:\XHARBOURB\LIB\HBZIP.LIB|zipstring
Error: Unresolved external 'std::_Locinfo::~_Locinfo()' referenced from C:\XHARBOURB\LIB\HBZIP.LIB|zipstring
Error: Unresolved external 'std::_Locinfo::_Locinfo(const char *)' referenced from C:\XHARBOURB\LIB\HBZIP.LIB|zipstring
Error: Unresolved external '__Getctyptab' referenced from C:\XHARBOURB\LIB\HBZIP.LIB|zipstring
Error: Unresolved external 'std::::_Register()' referenced from C:\XHARBOURB\LIB\HBZIP.LIB|zipstring
* Linking errors *


Program:
Code (fw): Select all Collapse
STATIC FUNCTION Compress (cFile, aFiles)

Β  Β LOCAL oDlg, oMeter, oText, nI, cMsg, nLen, lVal, nActual := 0

Β  Β nLen := LEN(aFiles)

Β  Β DEFINE DIALOG oDlg FROM 1, 1 TO 10, 60 TITLE "Backup in progress..."

Β  Β @ 0.5, 2 SAY oText Β  Β VAR cMsg Β  Β SIZE 180, 20 OF oDlg
Β  Β @ 2, 2 Β  METER oMeter VAR nActual TOTAL 100 OF oDlg SIZE 200, 20

Β  Β nI := 1
Β  Β oDlg:bStart:={|| lVal := Hb_ZIPFILE ( cFile, aFiles, 9, {|cFile,nPos| oText:;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β SetText('Compressing' + cFile), Β  Β  ;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β nActual := nPos / nLen * 100, oMeter: ;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β Set(nActual)} ), Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β ;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  IIF(lVal, MsgWait('Backup completed. File: ' + cFile, "Backup Information", 5), ;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  MsgStop('Backup Failed')), oDlg:END()}

Β  Β ACTIVATE DIALOG oDlg CENTERED

RETURN lVal
// EOF: Compress
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: To Antonio or Rao: Linking errors
Posted: Mon Sep 23, 2013 03:08 PM

Gustavo,

Please try to link cw32.lib from Borland C

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: To Antonio or Rao: Linking errors
Posted: Mon Sep 23, 2013 04:00 PM

Antonio:

The CW32.lib is already linked. Any other solution ? Thank you very much.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: To Antonio or Rao: Linking errors
Posted: Mon Sep 23, 2013 04:13 PM

Gustavo,

Please search for "Xran" inside your Borland cw32.lib and check if it is there (you can use a binary editor)

In Borland 5.8.2 those symbols are inside cw32.lib

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: To Antonio or Rao: Linking errors
Posted: Mon Sep 23, 2013 08:27 PM
Antonio:

I switched to BCC 5.82 and now got this other linker problem:
Code (fw): Select all Collapse
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ FiveWin for xHarbour 10.6 - Jun. 2010 Β  Β  Β  Β  Β  xHarbour development power β”‚β–„
β”‚ (c) FiveTech, 1993-2010 Β  Β  for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7 β”‚β–ˆ
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β–ˆ
Β  β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€
Compiling...
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6717)
Copyright 1999-2010, http://www.xharbour.org <!-- m --><a class="postlink" href="http://www.harbour-project.org/">http://www.harbour-project.org/</a><!-- m -->
Compiling 'CONVDEPT.prg' and generating preprocessed output to 'CONVDEPT.ppo'...

Lines 599, Functions/Procedures 12
Generating C source output to 'CONVDEPT.c'...
Done.
Borland C++ 5.82 for Win32 Copyright (c) 1993, 2005 Borland
CONVDEPT.c:
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Fatal: Unable to open file 'UUID.LIB'
* Linking errors *


The UUID.LIB is available in the %bcdir%\lib folder. I test for its existence with these two lines in the buildx.bat (I get the FILE EXIST ! message echoed at the console):
Code (fw): Select all Collapse
IF EXIST %bcdir%\lib\uuid.lib ECHO FILE EXIST !
PAUSE


Is there an easy way to switch to a Microsoft C compiler instead of using Borland's ? Maybe as a first step to go to VS2010 or later. Any suggestions ?
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: To Antonio or Rao: Linking errors
Posted: Mon Sep 23, 2013 08:41 PM

Did you solve your link issue with Harbour uuid.lib ? that should work fine

You can use Visual Studio 2012 Express with Harbour and FWH. Please review FWH/samples/buildh32.bat

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: To Antonio or Rao: Linking errors
Posted: Mon Sep 23, 2013 09:23 PM
Antonio:

I still have the message:
Code (fw): Select all Collapse
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Fatal: Unable to open file 'UUID.LIB'
* Linking errors *


I don't have the BUILDH32.BAT in my samples folder (FW 10.6).
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: To Antonio or Rao: Linking errors
Posted: Tue Sep 24, 2013 05:55 AM

Gustavo,

> Fatal: Unable to open file 'UUID.LIB'

Please copy it to the folder where you are building your EXE (this should not be needed but it helps on this error sometimes)

> I don't have the BUILDH32.BAT in my samples folder (FW 10.6).

You can not use FWH 10.6 with Visual Studio, sorry. FWH 13.08 runs nicely with Visual Studio 2010 and 2012

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: To Antonio or Rao: Linking errors
Posted: Tue Sep 24, 2013 05:13 PM

Antonio:

After copying the UUID.LIB everything linked ok. I will test the program later. Do you have any sort of guide on how to setup / migrate to VS 2010/2012 ? I will upgrade to the latest FW as soon as you point me in the right direction. I'm leaving xHarbour in favor of Harbour and Borland C to MS C. Thank you.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: To Antonio or Rao: Linking errors
Posted: Tue Sep 24, 2013 08:44 PM

Gustavo,

If you review FWH\samples\buildh32.bat you will see how to build your apps using Harbour and Visual Studio 2012 Express.

We also provide with FWH a Microsoft makefile to build your app using the Microsoft make. Please review FWH\makes folder.

And finally, you can even build your Harbour and FWH app from the Visual Studio IDE itself:

viewtopic.php?f=3t=26298start=0hilit=visual+studio

&&&

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: To Antonio or Rao: Linking errors
Posted: Tue Sep 24, 2013 10:24 PM

Antonio:

Thank you very much ! Everything working ok. Time to upgrade FW. :D

Continue the discussion