Page 1 of 1

Errors when making hello-world example

Posted: Wed Jul 04, 2018 1:10 pm
by Breezy121
I am new to devkitpro and am looking to make switch homebrew. I have tried to make the examples and have received errors. I don't really know what is wrong with it

Code: Select all

MSYS /c/devkitpro/examples/switch/graphics/printing/hello-world
$ make
main.c
aarch64-none-elf-gcc -MMD -MP -MF /c/devkitpro/examples/switch/graphics/printing/hello-world/build/main.d -g -Wall -O2 -ffunction-sections -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE  -I/c/devkitpro/examples/switch/graphics/printing/hello-world/include -I/opt/devkitpro/portlibs/switch/include -I/opt/devkitpro/libnx/include -I/c/devkitpro/examples/switch/graphics/printing/hello-world/build -D__SWITCH__ -c /c/devkitpro/examples/switch/graphics/printing/hello-world/source/main.c -o main.o
In file included from C:/devkitPro/libnx/include/switch.h:49,
                 from C:/devkitpro/examples/switch/graphics/printing/hello-world/source/main.c:4:
C:/devkitPro/libnx/include/switch/services/hid.h:356:15: error: expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(HidTouchScreenHeader) == 0x28, "Hid touch screen header structure has incorrect size");
               ^~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:356:53: error: expected declaration specifiers or '...' before string constant
 static_assert(sizeof(HidTouchScreenHeader) == 0x28, "Hid touch screen header structure has incorrect size");
                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:363:15: error: expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(HidTouchScreenEntryHeader) == 0x10, "Hid touch screen entry header structure has incorrect size");
               ^~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:363:58: error: expected declaration specifiers or '...' before string constant
 static_assert(sizeof(HidTouchScreenEntryHeader) == 0x10, "Hid touch screen entry header structure has incorrect size");
                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:377:15: error: expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(HidTouchScreenEntryTouch) == 0x28, "Hid touch screen touch structure has incorrect size");
               ^~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:377:57: error: expected declaration specifiers or '...' before string constant
 static_assert(sizeof(HidTouchScreenEntryTouch) == 0x28, "Hid touch screen touch structure has incorrect size");
                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:385:15: error: expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(HidTouchScreenEntry) == 0x298, "Hid touch screen entry structure has incorrect size");
               ^~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:385:53: error: expected declaration specifiers or '...' before string constant
 static_assert(sizeof(HidTouchScreenEntry) == 0x298, "Hid touch screen entry structure has incorrect size");
                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:393:15: error: expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(HidTouchScreen) == 0x3000, "Hid touch screen structure has incorrect size");
               ^~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:393:49: error: expected declaration specifiers or '...' before string constant
 static_assert(sizeof(HidTouchScreen) == 0x3000, "Hid touch screen structure has incorrect size");
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:406:15: error: expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(HidMouseHeader) == 0x20, "Hid mouse header structure has incorrect size");
               ^~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:406:47: error: expected declaration specifiers or '...' before string constant
 static_assert(sizeof(HidMouseHeader) == 0x20, "Hid mouse header structure has incorrect size");
                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:415:15: error: expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(HidMouseEntry) == 0x30, "Hid mouse entry structure has incorrect size");
               ^~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:415:46: error: expected declaration specifiers or '...' before string constant
 static_assert(sizeof(HidMouseEntry) == 0x30, "Hid mouse entry structure has incorrect size");
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:423:15: error: expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(HidMouse) == 0x400, "Hid mouse structure has incorrect size");
               ^~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:423:42: error: expected declaration specifiers or '...' before string constant
 static_assert(sizeof(HidMouse) == 0x400, "Hid mouse structure has incorrect size");
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:436:15: error: expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(HidKeyboardHeader) == 0x20, "Hid keyboard header structure has incorrect size");
               ^~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:436:50: error: expected declaration specifiers or '...' before string constant
 static_assert(sizeof(HidKeyboardHeader) == 0x20, "Hid keyboard header structure has incorrect size");
                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:445:15: error: expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(HidKeyboardEntry) == 0x38, "Hid keyboard entry structure has incorrect size");
               ^~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:445:49: error: expected declaration specifiers or '...' before string constant
 static_assert(sizeof(HidKeyboardEntry) == 0x38, "Hid keyboard entry structure has incorrect size");
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:453:15: error: expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(HidKeyboard) == 0x400, "Hid keyboard structure has incorrect size");
               ^~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:453:45: error: expected declaration specifiers or '...' before string constant
 static_assert(sizeof(HidKeyboard) == 0x400, "Hid keyboard structure has incorrect size");
                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:466:15: error: expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(HidControllerMAC) == 0x20, "Hid controller MAC structure has incorrect size");
               ^~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:466:49: error: expected declaration specifiers or '...' before string constant
 static_assert(sizeof(HidControllerMAC) == 0x20, "Hid controller MAC structure has incorrect size");
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:481:15: error: expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(HidControllerHeader) == 0x28, "Hid controller header structure has incorrect size");
               ^~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:481:52: error: expected declaration specifiers or '...' before string constant
 static_assert(sizeof(HidControllerHeader) == 0x28, "Hid controller header structure has incorrect size");
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:490:15: error: expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(HidControllerLayoutHeader) == 0x20, "Hid controller layout header structure has incorrect size");
               ^~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:490:58: error: expected declaration specifiers or '...' before string constant
 static_assert(sizeof(HidControllerLayoutHeader) == 0x20, "Hid controller layout header structure has incorrect size");
                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:500:15: error: expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(HidControllerInputEntry) == 0x30, "Hid controller input entry structure has incorrect size");
               ^~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:500:56: error: expected declaration specifiers or '...' before string constant
 static_assert(sizeof(HidControllerInputEntry) == 0x30, "Hid controller input entry structure has incorrect size");
                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:507:15: error: expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(HidControllerLayout) == 0x350, "Hid controller layout structure has incorrect size");
               ^~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:507:53: error: expected declaration specifiers or '...' before string constant
 static_assert(sizeof(HidControllerLayout) == 0x350, "Hid controller layout structure has incorrect size");
                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:518:15: error: expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(HidController) == 0x5000, "Hid controller structure has incorrect size");
               ^~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:518:48: error: expected declaration specifiers or '...' before string constant
 static_assert(sizeof(HidController) == 0x5000, "Hid controller structure has incorrect size");
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:540:15: error: expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(HidSharedMemory) == 0x40000, "Hid Shared Memory structure has incorrect size");
               ^~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:540:51: error: expected declaration specifiers or '...' before string constant
 static_assert(sizeof(HidSharedMemory) == 0x40000, "Hid Shared Memory structure has incorrect size");
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:547:15: error: expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(HidVibrationDeviceInfo) == 0x8, "Hid VibrationDeviceInfo structure has incorrect size");
               ^~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:547:54: error: expected declaration specifiers or '...' before string constant
 static_assert(sizeof(HidVibrationDeviceInfo) == 0x8, "Hid VibrationDeviceInfo structure has incorrect size");
                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:556:15: error: expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(HidVibrationValue) == 0x10, "Hid VibrationValue structure has incorrect size");
               ^~~~~~
C:/devkitPro/libnx/include/switch/services/hid.h:556:50: error: expected declaration specifiers or '...' before string constant
 static_assert(sizeof(HidVibrationValue) == 0x10, "Hid VibrationValue structure has incorrect size");
                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/devkitPro/libnx/include/switch.h:72,
                 from C:/devkitpro/examples/switch/graphics/printing/hello-world/source/main.c:4:
C:/devkitPro/libnx/include/switch/runtime/util/utf.h:19:1: error: unknown type name 'ssize_t'; did you mean 'size_t'?
 ssize_t decode_utf8 (uint32_t *out, const uint8_t *in);
 ^~~~~~~
 size_t
C:/devkitPro/libnx/include/switch/runtime/util/utf.h:29:1: error: unknown type name 'ssize_t'; did you mean 'size_t'?
 ssize_t decode_utf16(uint32_t *out, const uint16_t *in);
 ^~~~~~~
 size_t
C:/devkitPro/libnx/include/switch/runtime/util/utf.h:41:1: error: unknown type name 'ssize_t'; did you mean 'size_t'?
 ssize_t encode_utf8 (uint8_t *out, uint32_t in);
 ^~~~~~~
 size_t
C:/devkitPro/libnx/include/switch/runtime/util/utf.h:53:1: error: unknown type name 'ssize_t'; did you mean 'size_t'?
 ssize_t encode_utf16(uint16_t *out, uint32_t in);
 ^~~~~~~
 size_t
C:/devkitPro/libnx/include/switch/runtime/util/utf.h:71:1: error: unknown type name 'ssize_t'; did you mean 'size_t'?
 ssize_t utf8_to_utf16(uint16_t *out, const uint8_t  *in, size_t len);
 ^~~~~~~
 size_t
C:/devkitPro/libnx/include/switch/runtime/util/utf.h:89:1: error: unknown type name 'ssize_t'; did you mean 'size_t'?
 ssize_t utf8_to_utf32(uint32_t *out, const uint8_t  *in, size_t len);
 ^~~~~~~
 size_t
C:/devkitPro/libnx/include/switch/runtime/util/utf.h:107:1: error: unknown type name 'ssize_t'; did you mean 'size_t'?
 ssize_t utf16_to_utf8(uint8_t  *out, const uint16_t *in, size_t len);
 ^~~~~~~
 size_t
C:/devkitPro/libnx/include/switch/runtime/util/utf.h:125:1: error: unknown type name 'ssize_t'; did you mean 'size_t'?
 ssize_t utf16_to_utf32(uint32_t *out, const uint16_t *in, size_t len);
 ^~~~~~~
 size_t
C:/devkitPro/libnx/include/switch/runtime/util/utf.h:143:1: error: unknown type name 'ssize_t'; did you mean 'size_t'?
 ssize_t utf32_to_utf8(uint8_t  *out, const uint32_t *in, size_t len);
 ^~~~~~~
 size_t
C:/devkitPro/libnx/include/switch/runtime/util/utf.h:156:1: error: unknown type name 'ssize_t'; did you mean 'size_t'?
 ssize_t utf32_to_utf16(uint16_t *out, const uint32_t *in, size_t len);
 ^~~~~~~
 size_t
In file included from C:/devkitPro/libnx/include/switch.h:76,
                 from C:/devkitpro/examples/switch/graphics/printing/hello-world/source/main.c:4:
C:/devkitPro/libnx/include/switch/runtime/devices/fs_dev.h:20:3: error: unknown type name 'ssize_t'
   ssize_t           index;         ///< Current entry index
   ^~~~~~~
make[1]: *** [/opt/devkitpro/devkitA64/base_rules:19: main.o] Error 1
make: *** [Makefile:148: build] Error 2

Re: Errors when making hello-world example

Posted: Thu Jul 05, 2018 10:19 am
by WinterMute
How did you install?

Have you done anything other than run the windows installer before attempting to compile the example?