Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - using zlib
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

using zlib

 Post Reply Post Reply
Author
Message
Marcus View Drop Down
Groupie
Groupie


Joined: 04 June 2006
Location: Germany
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marcus Quote  Post ReplyReply Direct Link To This Post Topic: using zlib
    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?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
larryp View Drop Down
Groupie
Groupie


Joined: 15 January 2005
Location: United States
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote larryp Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 02 April 2008 at 1:26am
Hi,
but do you add it to our sources ?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.059 seconds.