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

Linking problems #30

Closed
koopthekoopa opened this issue May 6, 2021 · 4 comments
Closed

Linking problems #30

koopthekoopa opened this issue May 6, 2021 · 4 comments

Comments

@koopthekoopa
Copy link

I tried to compile libwiigui and it compiled the files
but when it links to elf file it displays this:
C:/devkitPro/portlibs/ppc/lib\libvorbisidec.a(info.o): In function tagcompare': info.c:(.text+0x40): undefined reference to __locale_ctype_ptr'
info.c:(.text+0x70): undefined reference to __locale_ctype_ptr' info.c:(.text+0x90): undefined reference to __locale_ctype_ptr'
C:/devkitPro/portlibs/ppc/lib\libfreetype.a(ftbzip2.o): In function ft_bzip2_stream_close': ftbzip2.c:(.text+0x3c): undefined reference to BZ2_bzDecompressEnd'
C:/devkitPro/portlibs/ppc/lib\libfreetype.a(ftbzip2.o): In function ft_bzip2_file_fill_output': ftbzip2.c:(.text+0x110): undefined reference to BZ2_bzDecompress'
C:/devkitPro/portlibs/ppc/lib\libfreetype.a(ftbzip2.o): In function ft_bzip2_stream_io': ftbzip2.c:(.text+0x3bc): undefined reference to BZ2_bzDecompressEnd'
ftbzip2.c:(.text+0x3f4): undefined reference to BZ2_bzDecompressInit' C:/devkitPro/portlibs/ppc/lib\libfreetype.a(ftbzip2.o): In function FT_Stream_OpenBzip2':
ftbzip2.c:(.text+0x668): undefined reference to `BZ2_bzDecompressInit'
collect2: ld returned 1 exit status
make[1]: *** [/opt/devkitpro/devkitPPC/wii_rules:25: /c/Libwiigui/libwiigui-demo.elf] Error 1
make: *** [Makefile:101: build] Error 2

is there a way to fix this?

@carstene1ns
Copy link

Do you have an old portlibs setup? Reinstall ppc-libvorbisidec, the first problem should go away then.

About the second issue: Can you post the output of this command?

$DEVKITPRO/portlibs/ppc/bin/freetype-config --libs

If it works correctly, it should include -lbz2. Otherwise, try reinstalling ppc-freetype.

@Spatchy
Copy link

Spatchy commented Jan 9, 2024

Bumping this old thread to say I also get undefined reference issue during build, specifically to these four variables:

  • font_ttf_size
  • bg_music_ogg_size
  • button_over_pcm_size
  • button_click_pcm_size

If I manually replace every reference to these in the code with the values found in the build directory, everything works. I have no idea why only these are affected.

-lb2 is included in the output of $DEVKITPRO/portlibs/ppc/bin/freetype-config --libs.

I have this exact same problem (the same four variables) on two different devices (1 Windows and 1 Arch Linux) on two completely independent environments.

@carstene1ns
Copy link

@Spatchy: you need to apply #28 locally.

@koopthekoopa
Copy link
Author

koopthekoopa commented Jun 7, 2024

(sorry for being very late) I just had a broken devkitPro install cause, to be honest, I had no idea what I was doing back then. But after knowing what to do, it's all working now! (I've also apply the pull #28 to fix the undefined reference issues)

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

3 participants