NO

Author Topic: Zlib and Pelles C  (Read 6776 times)

Freddy

  • Guest
Zlib and Pelles C
« on: November 30, 2005, 08:10:33 PM »
Hi Pelle!

I really like your IDE, compiler and tools.
After searching over the internet, I've found that Pelles C is the greatest IDE/compiler/linker for C development on win32. I think it's even better than MSVC++, because it's clean and light-weight.

I was thinking about creating a compression program. I've found zlib and I'll use it to create my file packer.
I need help installing zlib on Pelles C. I've downloaded zlib on http://www.zlib.net/ (zlib for Windows 9x/NT (DLL and static version). Installed it. Now I need help on what files I have to put on what folder.

Thanks!

Freddy

  • Guest
Zlib and Pelles C
« Reply #1 on: November 30, 2005, 08:26:55 PM »
I have put "zlib.lib" on "\PellesC\Lib" and "zlib.h" and "zconf.h" on "\PellesC\include\" and tried to compile this code:

Code: [Select]

#include <stdio.h>
#include <zlib.h>
#include <stdlib.h>


int main(int argc, char *argv[])
{
Bytef *data1="aaaaaatestauhuhauhauah";
uLongf size1=sizeof(data1);;
uLongf size2=size1;
Bytef *data2=malloc(size1);
compress(data2,&size2,data1,size1);
puts(data2);
getchar();
    return 1;
}



and returned these errors:


Quote

Building test.obj.
<unistd.h> require -Go compiler option!
C:\Arquivos de programas\PellesC\Include\zlib.h(1183): warning #2099: Missing type specifier.
C:\Arquivos de programas\PellesC\Include\zlib.h(1183): error #2001: Syntax error; found 'gzseek' expecting ';'.
C:\Arquivos de programas\PellesC\Include\zlib.h(1183): warning #2099: Missing type specifier.
C:\Arquivos de programas\PellesC\Include\zlib.h(1183): error #2095: Missing parameter type 'off_t'.
C:\Arquivos de programas\PellesC\Include\zlib.h(1183): warning #2099: Missing type specifier.
C:\Arquivos de programas\PellesC\Include\zlib.h(1183): error #2001: Syntax error; found 'offset' expecting ')'.
C:\Arquivos de programas\PellesC\Include\zlib.h(1183): error #2001: Syntax error; found 'int' expecting '{'.
C:\Arquivos de programas\PellesC\Include\zlib.h(1183): error #2001: Syntax error; found ')' expecting ';'.
C:\Arquivos de programas\PellesC\Include\zlib.h(1208): warning #2099: Missing type specifier.
C:\Arquivos de programas\PellesC\Include\zlib.h(1208): error #2120: Redeclaration of 'off_t' previously declared at C:\Arquivos de programas\PellesC\Include\zlib.h(1183): found 'int' expected 'int'.
C:\Arquivos de programas\PellesC\Include\zlib.h(1208): error #2001: Syntax error; found 'gztell' expecting ';'.
C:\Arquivos de programas\PellesC\Include\zlib.h(1208): warning #2027: Missing prototype for 'gztell'.
C:\Arquivos de programas\PellesC\Include\zlib.h(1208): error #2066: Illegal use of type name 'gzFile'.
C:\Arquivos de programas\PellesC\Include\zlib.h(1208): error #2001: Syntax error; found 'file' expecting ')'.
C:\Arquivos de programas\PellesC\Include\zlib.h(1208): error #2001: Syntax error; found 'file' expecting ';'.
C:\Arquivos de programas\PellesC\Include\zlib.h(1208): error #2001: Syntax error; found ')' expecting ';'.
C:\Arquivos de programas\PellesC\Include\zlib.h(1208): error #2061: Illegal statement termination.
C:\Arquivos de programas\PellesC\Include\zlib.h(1276): error #2095: Missing parameter type 'off_t'.
C:\Arquivos de programas\PellesC\Include\zlib.h(1276): warning #2099: Missing type specifier.
C:\Arquivos de programas\PellesC\Include\zlib.h(1276): error #2001: Syntax error; found 'len2' expecting ')'.
C:\Arquivos de programas\PellesC\Include\zlib.h(1301): error #2095: Missing parameter type 'off_t'.
C:\Arquivos de programas\PellesC\Include\zlib.h(1301): warning #2099: Missing type specifier.
C:\Arquivos de programas\PellesC\Include\zlib.h(1301): error #2001: Syntax error; found 'len2' expecting ')'.
C:\Documents and Settings\Frederico\Desktop\test.c(7): error #2001: Syntax error; found '{' expecting ';'.
C:\Documents and Settings\Frederico\Desktop\test.c(8): warning #2145: Assignment of 'char *' to 'unsigned char *'.
C:\Documents and Settings\Frederico\Desktop\test.c(13): warning #2145: Assignment of 'unsigned char *' to 'const char *'.
C:\Arquivos de programas\PellesC\Include\zlib.h(1183): warning #2114: Local 'whence' is not referenced.
*** Error code: 1 ***
Done.
[/quote]

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Zlib and Pelles C
« Reply #2 on: December 02, 2005, 07:49:22 AM »
I don't have time to test at the moment, but you might try to check/uncheck "Enable Microsoft extensions" and recompile. If that doesn't work, look in zconf.h. It tries to auto-detect various compilers, but I'm not sure how well it works...

Pelle
/Pelle

Muhammed

  • Guest
Zlib and Pelles C
« Reply #3 on: December 13, 2005, 08:59:41 PM »
Hello.
I've just installed Pelles and don't know how to use it (in theory i know but the c.files can't be find) so please tell me how to use pelles 'cause i tried it so many times. Thanks a lot.