Skip to content

Errors building Switch version #30

Open
@impeeza

Description

@impeeza

Describe your bug here. And how to reproduce it.

As reported on Discord, when you try to build Switch version on latest commits including eae20c6, you get errors:

C:/msys64/home/Impeeza/smw/src/types.h:4: warning: ignoring '#pragma warning ' [-Wunknown-pragmas]
    4 | #pragma warning(disable: 4244)
      |
switch_impl.c
gl_core_3_1.c
linking smw.elf
C:/msys64/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.2.0/../../../../aarch64-none-elf/bin/ld.exe: main.o: in function `main':
main.c:(.text.startup.main+0xe6c): undefined reference to `SmasSpcPlayer_Create'
C:/msys64/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.2.0/../../../../aarch64-none-elf/bin/ld.exe: common_cpu_infra.o: in function `SnesInit':
common_cpu_infra.c:(.text.SnesInit+0x274): undefined reference to `kSmbllGameInfo'
C:/msys64/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.2.0/../../../../aarch64-none-elf/bin/ld.exe: common_cpu_infra.c:(.text.SnesInit+0x278): undefined reference to `kSmbllGameInfo'
C:/msys64/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.2.0/../../../../aarch64-none-elf/bin/ld.exe: common_cpu_infra.c:(.text.SnesInit+0x2ec): undefined reference to `kSmb1GameInfo'
C:/msys64/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.2.0/../../../../aarch64-none-elf/bin/ld.exe: common_cpu_infra.c:(.text.SnesInit+0x2f0): undefined reference to `kSmb1GameInfo'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/opt/devkitpro/libnx/switch_rules:81: /home/Impeeza/smw/src/platform/switch/smw.elf] Error 1
make: *** [Makefile:167: bin] Error 2

Impeeza@Titan MINGW64 ~/smw/src/platform/switch```


![image](https://github.com/snesrev/smw/assets/41979604/9303090c-3eb4-4c56-a830-491aa16bc44f)

With the help of @GodReborn a new Makefile was created some little tweaks was made:

![image](https://github.com/snesrev/smw/assets/41979604/ef904499-c025-4502-bf65-d39674d7fd50)


Creating a PR including these changes.

### What is your build target?

Nintendo Switch

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions