1. kprovost7314

    OP kprovost7314 GBAtemp's Official Shota and Bara Master
    Member

    Joined:
    Dec 24, 2014
    Messages:
    1,978
    Country:
    United States
    So I decided to started working on 3DS homebrew again, and after a long hiatus I'm greeted with the following error when I compile the newest ctrulib:

    Code:
    (path)/libctru/source/console.c:467:2: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
      con_write,
      ^
    (path)/libctru/source/console.c:467:2: note: (near initialization for 'dotab_stdout.write_r') c:/Users/Kaleb/Desktop/ctrulib-master/libctru/source/console.c:485:2: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
      debug_write,
      ^
    (path)/libctru/source/console.c:485:2: note: (near initialization for 'dotab_3dmoo.write_r')
    cc1.exe: all warnings being treated as errors
    make[1]: *** [console.o] Error 1
    make: *** [build] Error 2
    Any fix for this?
     
  2. rtur

    rtur Member
    Newcomer

    Joined:
    Jan 19, 2017
    Messages:
    20
    Country:
    Dirty fix: You could go edit the Makefile, and remove the -Werror flags
     
  3. kprovost7314

    OP kprovost7314 GBAtemp's Official Shota and Bara Master
    Member

    Joined:
    Dec 24, 2014
    Messages:
    1,978
    Country:
    United States
    @rtur Removed -Werror and now I get:

    Code:
    In file included from (path)/libctru/source/services/soc/soc_select.c:5:0:
    (path)/libctru/include/sys/select.h:1:29: fatal error: sys/select.h: No such file or directory
    compilation terminated.
    make[1]: *** [soc_select.o] Error 1
    make: *** [build] Error 2
     
  4. Rusb

    Rusb GBAtemp Regular
    Member

    Joined:
    Apr 17, 2014
    Messages:
    173
    Country:
    sys/select.h: No such file or directory <- check if the file really exists in the directory and if in the makefile you are including that folder
     
  5. kprovost7314

    OP kprovost7314 GBAtemp's Official Shota and Bara Master
    Member

    Joined:
    Dec 24, 2014
    Messages:
    1,978
    Country:
    United States
    Yes it exists and the makefile only includes the include folder
     
  6. rtur

    rtur Member
    Newcomer

    Joined:
    Jan 19, 2017
    Messages:
    20
    Country:
  7. kprovost7314

    OP kprovost7314 GBAtemp's Official Shota and Bara Master
    Member

    Joined:
    Dec 24, 2014
    Messages:
    1,978
    Country:
    United States
  8. rtur

    rtur Member
    Newcomer

    Joined:
    Jan 19, 2017
    Messages:
    20
    Country:
    I've just cloned the repo and gave it a try, it works fine on my laptop (I'm running linux though)

    — Posts automatically merged - Please don't double post! —

    my gcc version
    Code:
    arm-none-eabi-gcc (devkitARM release 46) 6.3.0
    
    when I compile, commands look like these, compare with yours to see if something different strikes you
    Code:
    arm-none-eabi-gcc -MMD -MP -MF /home/rtur/devel/nintendo/3ds/ctrulib/libctru/build/ctru_exit.d -g -Wall -Werror -O2 -mword-relocations -ffunction-sections -fomit-frame-pointer -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -I/home/rtur/devel/nintendo/3ds/ctrulib/libctru/include  -I/home/rtur/devel/nintendo/3ds/ctrulib/libctru/build -DARM11 -D_3DS -c <input_file> -o <output_file>
    
     
  9. kprovost7314

    OP kprovost7314 GBAtemp's Official Shota and Bara Master
    Member

    Joined:
    Dec 24, 2014
    Messages:
    1,978
    Country:
    United States
    I got it to compile after updating devkitARM. Thanks!
     
    rtur likes this.
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - compiling, Ctrulib, error