12-02-2010 03:36 PM
I downloaded the ZLIB 1.2.5 DLL from zlib.net and I am trying to use it with a C program for LabWindows 8.5. I copied the DLL into my windows\system32 folder and the .h/.lib files into my project. When I try to build my code, I get an error that sys/types.h was not found. (zconf.h is trying to include this file. It does not exist in my LabWindows installation.) From previous posts, I know that other users have been able to build ZLIB using LabWindows. How do I do it?
Rich Ferrara
Solved! Go to Solution.
12-02-2010 04:22 PM
Rich:
types.h is commonly defined in unix systems. I'd suggest you start by commenting out line 364 in zconf.h and see what other errors you get.
Lines 363 through 365:
#ifdef STDC
# include <sys/types.h> /* for off_t */
#endif
The comment on line 364 says that types.h is included for off_t.
Here's a link from IBM that describes the contents of types.h
It describes off_t as follows.
off_t | File offset, measured in bytes from the beginning of a file or device. off_t is normally defined as a signed, 32-bit integer. In the programming environment which enables large files, off_t is defined to be a signed, 64-bit integer. |
If you comment out line 364 and get errors regarding off_t, define it yourself, using the default int size on your system.
typedef int off_t;
12-02-2010 04:34 PM
Thanks, it looks like that worked.