LabWindows/CVI

annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

How do I use ZLIB in LabWindows?

Risolto!
Vai alla soluzione

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

0 Kudos
Messaggio 1 di 3
3.959Visualizzazioni
Soluzione
Accettato da autore argomento richferrara

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

http://publib.boulder.ibm.com/infocenter/aix/v6r1/index.jsp?topic=/com.ibm.aix.files/doc/aixfiles/ty...

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;

Messaggio 2 di 3
3.951Visualizzazioni

Thanks, it looks like that worked.

0 Kudos
Messaggio 3 di 3
3.947Visualizzazioni