To Antonio or Rao: Linking errors

To Antonio or Rao: Linking errors

Postby HunterEC » Mon Sep 23, 2013 4: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: Select all  Expand view
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::locale::id::_Id_cnt' referenced from C:\XHARBOURB\LIB\HBZIP.LIB|zipstring
Error: Unresolved external 'std::locale::_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::locale::facet::_Register()' referenced from C:\XHARBOURB\LIB\HBZIP.LIB|zipstring
* Linking errors *


Program:
Code: Select all  Expand view

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
 
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: To Antonio or Rao: Linking errors

Postby Antonio Linares » Mon Sep 23, 2013 3:08 pm

Gustavo,

Please try to link cw32.lib from Borland C
regards, saludos

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

Re: To Antonio or Rao: Linking errors

Postby HunterEC » Mon Sep 23, 2013 4:00 pm

Antonio:

The CW32.lib is already linked. Any other solution ? Thank you very much.
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: To Antonio or Rao: Linking errors

Postby Antonio Linares » Mon Sep 23, 2013 4: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42094
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: To Antonio or Rao: Linking errors

Postby HunterEC » Mon Sep 23, 2013 8:27 pm

Antonio:

I switched to BCC 5.82 and now got this other linker problem:
Code: Select all  Expand view
┌────────────────────────────────────────────────────────────────────────────┐
│ 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 http://www.harbour-project.org/
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: Select all  Expand view
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 ?
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: To Antonio or Rao: Linking errors

Postby Antonio Linares » Mon Sep 23, 2013 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42094
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: To Antonio or Rao: Linking errors

Postby HunterEC » Mon Sep 23, 2013 9:23 pm

Antonio:

I still have the message:
Code: Select all  Expand view
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).
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: To Antonio or Rao: Linking errors

Postby Antonio Linares » Tue Sep 24, 2013 5: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42094
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: To Antonio or Rao: Linking errors

Postby HunterEC » Tue Sep 24, 2013 5: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.
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: To Antonio or Rao: Linking errors

Postby Antonio Linares » Tue Sep 24, 2013 8: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=3&t=26298&start=0&hilit=visual+studio
regards, saludos

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

Re: To Antonio or Rao: Linking errors

Postby HunterEC » Tue Sep 24, 2013 10:24 pm

Antonio:

Thank you very much ! Everything working ok. Time to upgrade FW. :D
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am


Return to FiveWin for Harbour/xHarbour

Who is online

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