FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour error compiling 'TESTZIP.PRG'
Posts: 811
Joined: Tue May 06, 2008 04:28 AM

error compiling 'TESTZIP.PRG'

Posted: Fri Jun 18, 2010 03:05 AM
Dear Mr. Antonio,

Im using FWH v10.5 and latest xHarbour for BCC582


I tried to compile testzip.prg with these errors:


I already included hbzip.lib but still cannot compile.

I need Zip/Unzip function in my current project.

Regards,
Frances
Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: error compiling 'TESTZIP.PRG'

Posted: Fri Jun 18, 2010 03:21 AM

Frances,

samples\TestZip.prg was just for FW 16 bits. We have to update it for FWH 32 and FWH 64.

Here in the forums there are several examples for 32 bits. Lets find them and we point them here.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM

Re: error compiling 'TESTZIP.PRG'

Posted: Fri Jun 18, 2010 03:22 AM

Frances...

is spanish, but easy to understand http://bielsys.blogspot.com/

Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM

Re: error compiling 'TESTZIP.PRG'

Posted: Fri Jun 18, 2010 04:22 AM
Dear Mr.Frances,

Here is a function to extract the contents of a zip file

Code (fw): Select all Collapse
*------------------------------------*
Function ExtractZip(cDriveLetter)
*------------------------------------*
Local aFiles,lOk,cFolderName
// Zip and Unzip functions, should include the libs named HbZip & zlib available in \xHarbour\lib
cFolderName:=cDriveLetter+"\"  // i.e c: or d:

// Creates an Array containing the list of files in the Test.Zip with Path
aFiles := hb_GetFilesInZip("Test")   

// The 3rd Parameter should be .T. if you need to extract contents of zip file as per Path
lOk := hb_unzipfile("Test",,.T.,,cFolderName,aFiles,NIL)
Return lOk


Regards
Anser
Posts: 811
Joined: Tue May 06, 2008 04:28 AM

Re: error compiling 'TESTZIP.PRG'

Posted: Fri Jun 18, 2010 04:49 AM

Dear Mr. Antonio, Mr. Daniel and Mr. Anser,

Than you for the prompt reply.

I need to zip a file before sating it to a blob field.. then unzip if user needs to read it and open corresponding app..
say "word.doc" -> compress to zip -> save as blob.. then if user wants to open it, blob to word.zip-> unzip word.zip -> open word.doc

Does xharbour has this function? I found hb_compress() for string only.

Best regards gentlemen,
Frances

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15

Continue the discussion