Hacking Including Zlib Library Compilation Error

BullyWiiPlaza

Nintendo Hacking <3
Member
Joined
Aug 2, 2014
Messages
1,932
Reaction score
1,584
Trophies
0
XP
2,522
Country
Germany
I tried including the zlib compression library in pygecko.c with
Code:
#include <zlib.h>
(in order to compress data before sending) but oddly enough, it gives me the following compilation error:
Code:
D:\Consoles\WiiU\Applications\Browser\tcpgecko>make
pygecko.c
In file included from d:/Consoles/WiiU/Applications/Browser/tcpgecko/src/pygecko.c:5:0:
d:/Consoles/WiiU/Applications/Browser/tcpgecko/src/dynamic_libs/os_functions.h:65:41: error: expected declaration specifiers or '...' before '(' token
#define SECS_TO_TICKS(sec)              (((unsigned long long)(sec)) * (BUS_SPEED/4))
                                         ^
d:/Consoles/WiiU/Applications/Browser/tcpgecko/src/dynamic_libs/os_functions.h:67:41: error: expected declaration specifiers or '...' before '(' token
#define MICROSECS_TO_TICKS(usec)        (SECS_TO_TICKS(usec) / 1000000)
                                         ^
make[1]: *** [pygecko.o] Error 1
make: *** [build] Error 2
Why is that? The code in os_functions.h is correct and I don't think there are any name conflicts. Any help would be great since I have no clue why this even happens and it would be great to get working so I'm stuck wondering what to try.

Thank you!

@dimok
@QuarkTheAwesome
@wj44
@FIX94
@NWPlayer123
 
header guards are missing there or circular header dependency or preprocessor definition name (#define) conflicts against some C definition somewhere
 
  • Like
Reactions: BullyWiiPlaza
header guards are missing there or circular header dependency or preprocessor definition name (#define) conflicts against some C definition somewhere
That is vague but somewhat helpful. Thanks for one on-point answer :)
Please, avoid quoting people in your threads, they can easily see it in the Thread list
No because they won't be notified. This way they probably see it and since usually nobody answers, this is what I do :P
 
An plausible test to narrow down the problem is to remove all references to os_functions.h (temporarily!) and see how the compiler responds.
I haven't really looked at the zlib header; I'd assuming it's leaving some fancy compiler thing turned on (extern C or something). Does the problem go away when you remove references to zlib.h?
 
Zlib is weird, check it's manual. I remember something about the directory location affecting builds. Gecko sees it as using wrong version if not located in a particular directory.
 
Last edited by ARVI80,

Site & Scene News

Popular threads in this forum