Error occurred during compiling of zip and uzip prgs.

Post Reply
Arindam
Posts: 44
Joined: Sat Jul 29, 2006 5:03 pm
Location: Kolkata, India

Error occurred during compiling of zip and uzip prgs.

Post 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
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Arindam,

samples\TestZip.prg is for FW 16 bits only
regards, saludos

Antonio Linares
www.fivetechsoft.com
Arindam
Posts: 44
Joined: Sat Jul 29, 2006 5:03 pm
Location: Kolkata, India

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Arindam,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post by Otto »

Is there somewhere a working zip-unzip- example for xHarbour/harbour?
Thanks in advance
Otto
toninhofwi
Posts: 161
Joined: Tue Oct 18, 2005 10:01 am

Post 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.
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post by Otto »

Thank you, Toninho.
But I don't have a
harbour\contrib\hbziparc
directory in my harbour directory.
Regards,
Otto
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post 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 
Post Reply