THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/03/2003 at 02:55, xxxxxxxx wrote:
This is just a standard include problem, zlib is possible to use (I've used it!), two solutions are to use #define to remove name conflicts, or to NOT include the zlib headers in any file using the c4d headers and create a source file with your own functions that wrap the zlib functions so you never need to include the zlib header (the solution I used since I only wanted basic zip/unzip of data). I created a file zip.cpp this the basic outline of it:
#include <stdio.h>
#ifdef __MAC
#include "zlib.h"
#include <string.h>
#define LONG long
#else
#include "zip/zlib.h"
#endif
int zip_filecompress(char *infile, void *&buf, LONG &dlen, LONG &slen)
{
...
}
int zip_fileuncompress(char *outfile, void *&sbuf, LONG dlen, LONG slen)
{
...}
then when I want to use it just declare the functions:
int zip_filecompress(char *infile, void *&buf, LONG &dlen, LONG &slen);
int zip_fileuncompress(char *outfile, void *&sbuf, LONG dlen, LONG slen);
and let the linker to the rest
This is from S&H, so I know it works
There was a thread about windows headers on plugincafe a while ago, sorry, can't remember when/subject, maybe try a search.