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

Fix linker issue #1

Open
svelterust opened this issue Jun 18, 2022 · 0 comments
Open

Fix linker issue #1

svelterust opened this issue Jun 18, 2022 · 0 comments

Comments

@svelterust
Copy link
Member

svelterust commented Jun 18, 2022

Figure out why c.VBlankIntrWait() from gba_systemcalls.h doesn't work.

zig-gba on  master [!] via ↯ v0.9.1 ❯ zig build
/opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/12.1.0/../../../../arm-none-eabi/bin/ld: zig-out/zig-gba.o: in function `main':
/home/odd/source/zig/zig-gba/src/main.zig:11: undefined reference to `VBlankIntrWait'
collect2: error: ld returned 1 exit status
The following command exited with error code 1 (expected 0):
cd /home/odd/source/zig/zig-gba && /opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc -g -mthumb -mthumb-interwork -Wl,-Map,zig-out/zig-gba.map -specs=/opt/devkitpro/devkitARM/arm-none-eabi/lib/gba.specs zig-out/zig-gba.o -L/opt/devkitpro/libgba/lib -L/opt/devkitpro/portlibs/libgba/lib -lgba -o zig-out/zig-gba.elf 
error: UnexpectedExitCode
/usr/lib/zig/std/os.zig:2714:19: 0x2a61e2 in std.os.readlinkZ (build)
        .INVAL => return error.NotLink,
                  ^
/usr/lib/zig/std/os.zig:2693:9: 0x2a6f32 in std.os.readlink (build)
        return readlinkZ(&file_path_c, out_buffer);
        ^
/usr/lib/zig/std/os.zig:2418:19: 0x294dbb in std.os.mkdiratZ (build)
        .EXIST => return error.PathAlreadyExists,
                  ^
/usr/lib/zig/std/os.zig:2380:9: 0x294ca3 in std.os.mkdirat (build)
        return mkdiratZ(dir_fd, &sub_dir_path_c, mode);
        ^
/usr/lib/zig/std/fs.zig:1261:9: 0x294b96 in std.fs.Dir.makeDir (build)
        try os.mkdirat(self.fd, sub_path, default_new_dir_mode);
        ^
/usr/lib/zig/std/os.zig:2418:19: 0x294dbb in std.os.mkdiratZ (build)
        .EXIST => return error.PathAlreadyExists,
                  ^
/usr/lib/zig/std/os.zig:2380:9: 0x294ca3 in std.os.mkdirat (build)
        return mkdiratZ(dir_fd, &sub_dir_path_c, mode);
        ^
/usr/lib/zig/std/fs.zig:1261:9: 0x294b96 in std.fs.Dir.makeDir (build)
        try os.mkdirat(self.fd, sub_path, default_new_dir_mode);
        ^
/usr/lib/zig/std/build/RunStep.zig:238:17: 0x2adc80 in std.build.RunStep.make (build)
                return error.UnexpectedExitCode;
                ^
/usr/lib/zig/std/build.zig:3201:9: 0x295fce in std.build.Step.make (build)
        try self.makeFn(self);
        ^
/usr/lib/zig/std/build.zig:502:9: 0x29466c in std.build.Builder.makeOneStep (build)
        try s.make();
        ^
/usr/lib/zig/std/build.zig:496:17: 0x294618 in std.build.Builder.makeOneStep (build)
                return err;
                ^
/usr/lib/zig/std/build.zig:496:17: 0x294618 in std.build.Builder.makeOneStep (build)
                return err;
                ^
/usr/lib/zig/std/build.zig:496:17: 0x294618 in std.build.Builder.makeOneStep (build)
                return err;
                ^
/usr/lib/zig/std/build.zig:457:13: 0x285901 in std.build.Builder.make (build)
            try self.makeOneStep(s);
            ^
/usr/lib/zig/std/special/build_runner.zig:213:21: 0x27a384 in main (build)
            else => return err,
                    ^
error: the following build command failed with exit code 1:
/home/odd/source/zig/zig-gba/zig-cache/o/88764fb0e286c9b9bc25dc7c887d9e5e/build /usr/bin/zig /home/odd/source/zig/zig-gba /home/odd/source/zig/zig-gba/zig-cache /home/odd/.cache/zig
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

1 participant