Hacking Including Zlib Library Compilation Error

BullyWiiPlaza

Nintendo Hacking <3
OP
Member
Joined
Aug 2, 2014
Messages
1,932
Trophies
0
XP
2,477
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
 

Coto

-
Member
Joined
Jun 4, 2010
Messages
2,979
Trophies
2
XP
2,565
Country
Chile
header guards are missing there or circular header dependency or preprocessor definition name (#define) conflicts against some C definition somewhere
 
  • Like
Reactions: BullyWiiPlaza

BullyWiiPlaza

Nintendo Hacking <3
OP
Member
Joined
Aug 2, 2014
Messages
1,932
Trophies
0
XP
2,477
Country
Germany
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
 
Joined
Apr 19, 2015
Messages
1,023
Trophies
1
Location
Stuck in the PowerPC
Website
heyquark.com
XP
3,912
Country
Australia
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?
 

ARVI80

Well-Known Member
Member
Joined
Feb 25, 2016
Messages
197
Trophies
0
Age
43
Location
UK
XP
315
Country
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

General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: This parrot is no more it has ceased to be!