Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default template fails to link with "undefined reference to gfxInitDefault" error #3

Open
aesedepece opened this issue Apr 7, 2019 · 1 comment

Comments

@aesedepece
Copy link

gfxInitDefault and other gfx-related symbols are supposed to be re-published in libnx_rs::libnx:

https://github.com/ischeinkman/libnx-rs/blob/7ba2e97c5bf58389c72379f62d2b208fd5fd02f5/src/lib.rs#L63

The import at main.rs actually works:

use libnx_rs::libnx::*;

However, when linking, all those symbols seem not be available:

/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld: /workdir/target/aarch64-none-elf/release/deps/libnxbin-774b4b2a5e0fe4cb.libnxbin.va83c9i4-cgu.0.rcgu.o: in function `libnxbin::example':
          /workdir/src/main.rs:132: undefined reference to `gfxInitDefault'
          /opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld: /workdir/src/main.rs:210: undefined reference to `gfxExit'
          /opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld: /workdir/src/main.rs:205: undefined reference to `gfxFlushBuffers'
          /opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld: /workdir/src/main.rs:206: undefined reference to `gfxSwapBuffers'
          /opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld: /workdir/src/main.rs:207: undefined reference to `gfxWaitForVsync'
          collect2: error: ld returned 1 exit status

Am I doing something wrong?

@ischeinkman
Copy link
Owner

Ah shoot. Looks like the old gfx API was removed in libnx itself, which means that the API and examples need to be updated to use the new window system.
In the meantime libnx 2.0.0 should still work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants