Print Page | Close Window

using zlib

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=4839
Printed Date: 07 June 2025 at 11:14am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: using zlib
Posted By: Marcus
Subject: using zlib
Date Posted: 20 August 2006 at 3:11pm
Hi! Now that zlib is part of the ToolKit, I would like to use it in my application too. When I link MFC and XTP statically, zlib functions like compress() uncompress() can easiely be called without any problem. But when linking MFC/XTP dynamically, I get an "error LNK2019: unresolved external symbol " Could somebody give me a hint on how to call the functions in the dll?



Replies:
Posted By: Oleg
Date Posted: 20 August 2006 at 7:46pm
Hi
 
From dll exported only functions that marked with _XTP_EXT_CLASS
 
you can manually add some function in some .h file
 
_XTP_EXT_CLASS void ZLibCompress(..)
{
  compress(...);
}


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: larryp
Date Posted: 01 April 2008 at 5:19pm
I have the same question but I cannot get Oleg's suggestion to work.
 
For the following function:

_XTP_EXT_CLASS int ZLibCompress( Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)

{

return compress( dest, destLen, source, sourceLen);

}

I get the following:
 
error C2491: 'ZLibCompress' : definition of dllimport function not allowed


Posted By: Oleg
Date Posted: 02 April 2008 at 1:26am
Hi,
but do you add it to our sources ?


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net