IsZip() Unresolved external

Post Reply
User avatar
avista
Posts: 301
Joined: Fri Jun 01, 2007 9:07 am
Location: Macedonia

IsZip() Unresolved external

Post by avista »

Hi,
I have try to build sample probram TESTUZIP.PRG
But next errors producet while byilding a program.

Error: Unresolved external '_HB_FUN_UNZIPFILE' referenced from D:\FWH\SAMPLES\TESTUZIP.OBJ
Error: Unresolved external '_HB_FUN_ISZIP' referenced from D:\FWH\SAMPLES\TESTUZIP.OBJ
Error: Unresolved external '_HB_FUN_GETFIRSTINZIP' referenced from D:\FWH\SAMPLES\TESTUZIP.OBJ
Error: Unresolved external '_HB_FUN_GETNEXTINZIP' referenced from D:\FWH\SAMPLES\TESTUZIP.OBJ
Error: Unresolved external '_HB_FUN_CLOSEZIPFILE' referenced from D:\FWH\SAMPLES\TESTUZIP.OBJ

Have i missed some library or ?

Best regards,
User avatar
Richard Chidiak
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France
Contact:

Re: IsZip() Unresolved external

Post by Richard Chidiak »

You need to link the hbzip libraries

for harbour for example you need minizip.lib hbziparc.lib hbmzip.lib

for xharbour hpzip.lib zlib.lib

Hth

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: IsZip() Unresolved external

Post by ukoenig »

I noticed the same errors.

For xharbour => hbzip.lib and zlib.lib is included in my makefile.
I still need ZIP for my new allinone BACKUP-solution.

Image

Multiple Backup / Restore can be mixed
Directory or single file Backup / Restore
Progressbar of a single file and file-counter of a directory
creates optional a Subdir of a selected Target-directory
select all files of a directory-backup / restore, or define up to 5 file-extension-filters
Painters for Window, Dialog, XBrowse-colors and Progressbar-colors
Create a standalone EXE of the all selections
and more ...

Directory = .T. selects a directory backup or restore
Directory = .F. selects a file backup or restore
Backup and Restore = .F. disables a selection
Restore = .T. switches < Source / Target >

Image

Best regards
Uwe :?:
Last edited by ukoenig on Thu Dec 19, 2013 11:06 pm, edited 2 times in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
Richard Chidiak
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France
Contact:

Re: IsZip() Unresolved external

Post by Richard Chidiak »

Uwe

To be honest , i do not like Hb_zip or Hb_unzip, Not very friendly and easy to use.

I highly prefer and use 7z as line command , it works just great. I have been using it since several years , only one file to ship 7z.exe , no libs or whatever....

Hth

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: IsZip() Unresolved external

Post by ukoenig »

Richard
I added the ZIP-option

Easy to use.
Just define, if You want to create a ZIP-file of the backup-files.

I will try, using 7Zip - from commandline.

Is there a way, to use the first progressbar during creating the zipfile
like I use, to copy a big single-file ?

Maybe it is possible.
Found :
http://atombomb.no-ip.org/blog/2010/08/ ... r-support/

The first sample will make a directory-backup and creates a Zip-file
inside the defined Target-directory. ALL files are used ( NO filter ).

Image

Best regards
Uwe :lol:
Last edited by ukoenig on Thu Dec 19, 2013 11:07 pm, edited 1 time in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
avista
Posts: 301
Joined: Fri Jun 01, 2007 9:07 am
Location: Macedonia

Re: IsZip() Unresolved external

Post by avista »

Hi,
I ahve readed somewhere in this forum that functions
ISZIP
GETFIRSTINZIP
GETNEXTINZIP
CLOSEZIPFILE
UNZIPFILE
ZIPFILE
are for 16 bit version only and probably ??? not solution in FWH for 32 bit versions

I have tested TESTZIP.PRG from sample folder and working ok
Hb_ZIPFILE()
Hb_UnZipFile()
hb_GetFilesInZip(cFile)

BUT hb_GetFilesInZip(cFile) manytimes crash the program ... if file is damaged
and i have leave it.

I wish to know what Antonio have to say ...but ...

Best regards,
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: IsZip() Unresolved external

Post by Enrico Maria Giordano »

avista wrote:BUT hb_GetFilesInZip(cFile) manytimes crash the program ...
For your information, I'm using Hb_GetFilesInZip() estensively since many years and never had any crash so far.

EMG
User avatar
avista
Posts: 301
Joined: Fri Jun 01, 2007 9:07 am
Location: Macedonia

Re: IsZip() Unresolved external

Post by avista »

For your information, I'm using Hb_GetFilesInZip() estensively since many years and never had any crash so far.
Sample program,

Code: Select all

#include "FiveWin.ch"

FUNCTION Main()

   LOCAL cFile
   LOCAL nFiles

   cFile  := "test1.zip"
   nFiles := Len(hb_GetFilesInZip(cFile))
   MsgInfo("Check 1 ok")

   cFile  := "test2.zip"
   nFiles := Len(hb_GetFilesInZip(cFile))
   MsgInfo("Check 2 ok")

RETURN NIL
 
Make 2 zip files "Test1.zip" and "Test2.zip"
Execute the program ... going ok

Case 1.
Make READONLY the file "Test2.zip"
Program crash on checking
Case 2.
IF.ZIP file is damaged ...
For example open file "Test2.zip" with EDIT and save it .. so we have damaged .ZIP file
Program crash on checking

That is verry important becouse manytimes while copying .zip files through LAN if copying dont finish
we have damaged files...

Best retards,
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: IsZip() Unresolved external

Post by cnavarro »

It may be of interest to any of you
2013-12-18 21:05 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/Makefile
+ include/hbzlib.h
* include/hbzlib.ch
* src/rtl/Makefile
* src/rtl/hbzlib.c
+ added new C functions weakly bound with ZLIB library:
HB_SIZE hb_zlibCompressBound( HB_SIZE nLen );
HB_SIZE hb_zlibUncompressedSize( const char * pSrc, HB_SIZE nLen,
int * piResult );
int hb_zlibCompress( char * pDst, HB_SIZE * pnDst,
const char * pSrc, HB_SIZE nLen, int iLevel );
int hb_zlibUncompress( char * pDst, HB_SIZE * pnDst,
const char * pSrc, HB_SIZE nLen );
these functions can be used by any C code without forcing ZLIB liking.
If user usese in his code HB_ZCOMPRESS() function or has
REQUEST HB_ZCOMPRESS
then above funcitons are automatically bound with linked ZLIB library.
Otherwise they return 0 or HB_ZLIB_RES_UNSUPPORTED error.
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
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: IsZip() Unresolved external

Post by Enrico Maria Giordano »

avista wrote:Sample program,

Code: Select all

#include "FiveWin.ch"

FUNCTION Main()

   LOCAL cFile
   LOCAL nFiles

   cFile  := "test1.zip"
   nFiles := Len(hb_GetFilesInZip(cFile))
   MsgInfo("Check 1 ok")

   cFile  := "test2.zip"
   nFiles := Len(hb_GetFilesInZip(cFile))
   MsgInfo("Check 2 ok")

RETURN NIL
 
Make 2 zip files "Test1.zip" and "Test2.zip"
Execute the program ... going ok

Case 1.
Make READONLY the file "Test2.zip"
Program crash on checking
Case 2.
IF.ZIP file is damaged ...
For example open file "Test2.zip" with EDIT and save it .. so we have damaged .ZIP file
Program crash on checking

That is verry important becouse manytimes while copying .zip files through LAN if copying dont finish
we have damaged files...

Best retards,
Just trap the error with TRY/CATCH/END.

EMG
User avatar
jll-fwh
Posts: 385
Joined: Fri Jan 29, 2010 8:14 pm
Location: Meliana - Valencia
Contact:

Re: IsZip() Unresolved external

Post by jll-fwh »

Hello;

Here disponeis of a complete program for backup using ZIP.

http://javierlloris.blogspot.com.es/201 ... store.html

regards
JLL
Libreria: FWH/FWH1109 + Harbour 3.1.1 + Borland C++ 5.8.2
Editor de Recursos: PellecC
ADA + OURXDBU -
S.O: XP / Win 7
Blog: http://javierlloris.blogspot.com.es/
e-mail: jllorispersonal@gmail.com
Post Reply