Including Zlib Library Compilation Error

Discussion in 'Wii U - Hacking & Backup Loaders' started by BullyWiiPlaza, Jan 9, 2017.

  1. BullyWiiPlaza
    OP

    BullyWiiPlaza Nintendo Hacking <3

    Member
    1,666
    1,369
    Aug 2, 2014
    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
     
  2. NexoCube

    NexoCube stop using piracy :(

    Member
    1,184
    587
    Nov 3, 2015
    France
    Stack Pointer
    Please, avoid quoting people in your threads, they can easily see it in the Thread list
     
  3. Net-KILLER

    Net-KILLER computer says no

    Member
    610
    365
    Oct 22, 2009
    Saint Kitts and Nevis
    in a pineapple under the sea
    I think they would tell him if they don't like it.
     
  4. NexoCube

    NexoCube stop using piracy :(

    Member
    1,184
    587
    Nov 3, 2015
    France
    Stack Pointer
    let me being rude :(
     
    Net-KILLER likes this.
  5. Coto

    Coto GBAtemp Addict

    Member
    2,343
    394
    Jun 4, 2010
    Chile
    header guards are missing there or circular header dependency or preprocessor definition name (#define) conflicts against some C definition somewhere
     
    BullyWiiPlaza likes this.
  6. BullyWiiPlaza
    OP

    BullyWiiPlaza Nintendo Hacking <3

    Member
    1,666
    1,369
    Aug 2, 2014
    Germany
    That is vague but somewhat helpful. Thanks for one on-point answer :)
    No because they won't be notified. This way they probably see it and since usually nobody answers, this is what I do :P
     
  7. Coto

    Coto GBAtemp Addict

    Member
    2,343
    394
    Jun 4, 2010
    Chile
    Not vague, but to the point. You can google those for examples.
     
  8. QuarkTheAwesome

    QuarkTheAwesome Working for Hugs

    Member
    761
    1,852
    Apr 19, 2015
    Australia
    Stuck in the PowerPC
    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?
     
  9. ARVI80

    ARVI80 GBAtemp Regular

    Member
    170
    87
    Feb 25, 2016
    UK
    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, Jan 10, 2017