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,909
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
  • Badcatalex @ Badcatalex:
    they killed LittleBigPlanet online, which was the main core of every LBP game
  • BakerMan @ BakerMan:
    for real
  • BakerMan @ BakerMan:
    at least with them, it was because of the DDOS attacks, ubisoft was just scummy
  • BakerMan @ BakerMan:
    fuck ubisoft, and fuck activision
    +1
  • realtimesave @ realtimesave:
    Nintendo needs to release a new console, switch is getting such shitty little games lately lol it's pathetic
  • Purple_Heart @ Purple_Heart:
    Lmao a new flashcart... The Unlock Switch... I knew it's not fake xD
    +1
  • NinStar @ NinStar:
    A new consoles won't solve that problem
  • NinStar @ NinStar:
    It will actually make it worse
  • The Real Jdbye @ The Real Jdbye:
    well actually
    a new console won't do anything right now, because the games are still in development, that's why there are few games being released
  • The Real Jdbye @ The Real Jdbye:
    it won't make the games finish any faster
  • Veho @ Veho:
    2/3rds of launch titles for the Switch 2 will just be lazy ports of Switch games anyway.
  • The Real Jdbye @ The Real Jdbye:
    probably
  • The Real Jdbye @ The Real Jdbye:
    maybe mario kart 9 will be a launch title
  • The Real Jdbye @ The Real Jdbye:
    i really want a new mario kart
  • Veho @ Veho:
    What, you mean the endless stream of DLCs doesn't count?
  • Veho @ Veho:
    Why develop a new game when you can just sell season passes forever?
  • Veho @ Veho:
    I'm still on MKDS so I'm not bothered :tpi:
  • The Real Jdbye @ The Real Jdbye:
    i like the dlc tbh, i'd like a new game more
  • ZeroT21 @ ZeroT21:
    but the current version is still selling fine at full price
  • SylverReZ @ SylverReZ:
    Hello
  • ZeroT21 @ ZeroT21:
    sup
    +1
  • SylverReZ @ SylverReZ:
    @realtimesave, You seen the Unlock Switch flashcart yet?
  • K3Nv2 @ K3Nv2:
    I'll see the 19.0 update that blocks use ability to it
    +1
  • K3Nv2 @ K3Nv2:
    Lol newegg+
    Screenshot-20240423-053504-Gmail.jpg
    SylverReZ @ SylverReZ: https://www.youtube.com/watch?v=MP9YR4BXrzA