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

'Undefined reference' when attempting to build with MSYS2 instructions #1738

Closed
RetroEdit opened this issue Apr 26, 2020 · 0 comments
Closed

'Undefined reference' when attempting to build with MSYS2 instructions #1738

RetroEdit opened this issue Apr 26, 2020 · 0 comments

Comments

@RetroEdit
Copy link

@RetroEdit RetroEdit commented Apr 26, 2020

It was confirmed to me that this is a known issue, but I don't think it's been filed here in the tracker. Essentially, mGBA's current instructions for building on Windows recommend using MSYS2. However, the build fails at the linking step for the final SDL and Qt executables. Below is a partial list of the 'Undefined references' errors that occur:

[ 53%] Linking C executable mgba-sdl.exe 
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/mgba-sdl.dir/objects.a(sdl-audio.c.obj):sdl-audio.c:(.text+0x8c): undefined reference to `mCoreSyncLockAudio' 
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/mgba-sdl.dir/objects.a(sdl-audio.c.obj):sdl-audio.c:(.text+0xad): undefined reference to `blip_set_rates' 
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/mgba-sdl.dir/objects.a(sdl-audio.c.obj):sdl-audio.c:(.text+0xc6): undefined reference to `blip_set_rates' 
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/mgba-sdl.dir/objects.a(sdl-audio.c.obj):sdl-audio.c:(.text+0xdb): undefined reference to `blip_samples_avail' 
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/mgba-sdl.dir/objects.a(sdl-audio.c.obj):sdl-audio.c:(.text+0xfb): undefined reference to `blip_read_samples' 
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/mgba-sdl.dir/objects.a(sdl-audio.c.obj):sdl-audio.c:(.text+0x113): undefined reference to `mCoreSyncConsumeAudio' 
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/mgba-sdl.dir/objects.a(sdl-audio.c.obj):sdl-audio.c:(.text+0x188): undefined reference to `GBAAudioCalculateRatio' 
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/mgba-sdl.dir/objects.a(sdl-audio.c.obj):sdl-audio.c:(.text+0x1c2): undefined reference to `blip_read_samples' 
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/mgba-sdl.dir/objects.a(sdl-audio.c.obj):sdl-audio.c:(.text+0x2ae): undefined reference to `mLog' 
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/mgba-sdl.dir/objects.a(sdl-audio.c.obj):sdl-audio.c:(.text+0x2f6): undefined reference to `mLog' 
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/mgba-sdl.dir/objects.a(sdl-audio.c.obj):sdl-audio.c:(.text.startup+0x13): undefined reference to `mLogGenerateCategory' 
@endrift endrift closed this in ff4406f May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant