Page 1 of 1

Error occurred during compiling of zip and uzip prgs.

Posted: Sun Mar 18, 2007 3:07 am
by Arindam
Hello friends,

I am getting the following errors during compilation. Where should I edit the code to get correct result.

During compile of \fwh\sample\testzip.prg the following errors are occured.

testzip.obj : error LNK2001: unresolved external symbol "void __cdecl HB_FUN_ZIP
MSG(void)" (?HB_FUN_ZIPMSG@@YAXXZ)

testzip.obj : error LNK2001: unresolved external symbol "void __cdecl HB_FUN_ZIP
BLOCK(void)" (?HB_FUN_ZIPBLOCK@@YAXXZ)

testzip.obj : error LNK2001: unresolved external symbol "void __cdecl HB_FUN_ZIP
TYPE(void)" (?HB_FUN_ZIPTYPE@@YAXXZ)

testzip.obj : error LNK2001: unresolved external symbol "void __cdecl HB_FUN_ZIP
FILE(void)" (?HB_FUN_ZIPFILE@@YAXXZ)

testzip.exe : fatal error LNK1120: 4 unresolved externals
* There are errors

During compile of \fwh\sample\testuzip.prg the following errors are occured.

testuzip.obj : error LNK2001: unresolved external symbol "void __cdecl HB_FUN_CL
OSEZIPFILE(void)" (?HB_FUN_CLOSEZIPFILE@@YAXXZ)

testuzip.obj : error LNK2001: unresolved external symbol "void __cdecl HB_FUN_GE
TNEXTINZIP(void)" (?HB_FUN_GETNEXTINZIP@@YAXXZ)

testuzip.obj : error LNK2001: unresolved external symbol "void __cdecl HB_FUN_GE
TFIRSTINZIP(void)" (?HB_FUN_GETFIRSTINZIP@@YAXXZ)

testuzip.obj : error LNK2001: unresolved external symbol "void __cdecl HB_FUN_IS
ZIP(void)" (?HB_FUN_ISZIP@@YAXXZ)

testuzip.obj : error LNK2001: unresolved external symbol "void __cdecl HB_FUN_UN
ZIPFILE(void)" (?HB_FUN_UNZIPFILE@@YAXXZ)

testuzip.exe : fatal error LNK1120: 5 unresolved externals
* There are errors

Can any one help me?

With regards,
Arindam

Posted: Sun Mar 18, 2007 1:13 pm
by James Bott
Arindam,

You have to link in the zip library. It depends on which version of Harbour or xHarbour you are using which zip library(s) you need. I don't remember them all, but for xHarbour I use HBZIP.LIB. You can try searching the forum for the names of the others if you need them. I think the commercial version of xHarbour uses different libs.

James

Posted: Sun Mar 18, 2007 6:50 pm
by Antonio Linares
Arindam,

samples\TestZip.prg is for FW 16 bits only

Posted: Mon Mar 19, 2007 2:11 pm
by Arindam
Antonio,

Thanks for your post reply.

From which sample should i get some idea on zip/unzip. Is there any 32 bits sample.

with regards,
Arindam

Posted: Tue Mar 20, 2007 7:34 am
by Antonio Linares
Arindam,

Have a look at Harbour/xharbour CVS files, tests directory

Posted: Sun Nov 09, 2008 10:17 am
by Otto
Is there somewhere a working zip-unzip- example for xHarbour/harbour?
Thanks in advance
Otto

Posted: Sun Nov 09, 2008 11:39 am
by toninhofwi
Otto wrote:Is there somewhere a working zip-unzip- example for xHarbour/harbour?
Thanks in advance
Otto
Otto, see in harbour\contrib\hbziparc\tests

Regards,

Toninho.

Posted: Sun Nov 09, 2008 3:35 pm
by Otto
Thank you, Toninho.
But I don't have a
harbour\contrib\hbziparc
directory in my harbour directory.
Regards,
Otto

Posted: Sun Nov 09, 2008 5:24 pm
by James Bott
Otto,

Here is an example from an old message. The LIBs are in xHarbour\lib.

James

Code: Select all

Posted: Tue Aug 26, 2008 8:37 pm    Post subject:    

--------------------------------------------------------------------------------
 
I use xHarbour's HB_ZIPFILE(). 

In its simplest form use:- 
HB_ZIPFILE( cZipFile, aFiles2Zip) 

Full spec is : 

HB_ZIPFILE( <cFile>, <cFileToCompress> | <aFiles>, <nLevel>,; 
<bBlock>, <lOverWrite>, <cPassword>, <lWithPath>,; <lWithDrive>, ; <pFileProgress> ) ---> lCompress 

For unziping: 

HB_UNZIPFILE( <cZipFile>, <bBlock>, <lWithPath>,; 
<cPassWord>, <cPath>, <cFile> | <aFile>, <pFileProgress> ) ---> lCompress 

Note that you must link HBZIP.lib and ZLIB.lib. 

Works really well for me. 

Colin