Page 1 of 1

IsZip() Unresolved external

PostPosted: Tue Dec 17, 2013 11:01 am
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,

Re: IsZip() Unresolved external

PostPosted: Tue Dec 17, 2013 3:45 pm
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

Re: IsZip() Unresolved external

PostPosted: Thu Dec 19, 2013 1:48 pm
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 :?:

Re: IsZip() Unresolved external

PostPosted: Thu Dec 19, 2013 7:27 pm
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

Re: IsZip() Unresolved external

PostPosted: Thu Dec 19, 2013 9:33 pm
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:

Re: IsZip() Unresolved external

PostPosted: Thu Dec 19, 2013 10:42 pm
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,

Re: IsZip() Unresolved external

PostPosted: Fri Dec 20, 2013 11:10 am
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

Re: IsZip() Unresolved external

PostPosted: Fri Dec 20, 2013 2:07 pm
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  Expand view
#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,

Re: IsZip() Unresolved external

PostPosted: Sat Dec 21, 2013 9:38 pm
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.

Re: IsZip() Unresolved external

PostPosted: Sat Dec 21, 2013 9:56 pm
by Enrico Maria Giordano
avista wrote:Sample program,
Code: Select all  Expand view
#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

Re: IsZip() Unresolved external

PostPosted: Wed Feb 19, 2014 1:08 am
by jll-fwh
Hello;

Here disponeis of a complete program for backup using ZIP.

http://javierlloris.blogspot.com.es/2012/04/programa-backuprestore.html

regards
JLL