LINK : fatal error LNK1181: cannot open input file 'SDL2_mixer.lib'

I’ve spent hours trying to set up SLD2 Mixer 2.0.4 on Visual Studio 2022 (C++) but I can’t find the file: SDL2_mixer.lib anywhere on the internet.

SDL2_mixer.lib does not appear to be included in the files @ https://www.libsdl.org/projects/SDL_mixer/

I’m now completely confused. Everything seems to be in place except this one file, and this is the error I’m getting without it:

Build started…
1>------ Build started: Project: Parrallax Zoom, Configuration: Release x64 ------
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1092,5): error MSB6006: “link.exe” exited with code 1181.
1>LINK : fatal error LNK1181: cannot open input file ‘SDL2_mixer.lib’
1>Done building project “Parrallax Zoom.vcxproj” – FAILED.
2>------ Skipped Build: Project: ParallaxZoomInstaller, Configuration: Release ------
2>Project not selected to build for this solution configuration
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 1 skipped ==========

Can someone please point me to SDL2_mixer.lib or tell me what I’m doing wrong?

Hi, could you ensure that you’ve grabbed the Development Libraries ? I checked myself and this archive does contain SDL_mixer.lib in lib/x64 and lib/x86.

If it is correct, also make sure that the Library Directories (in the VC++ Directories tab) is properly set up:

  • /path/to/SDL_mixer/lib/x64 for x64 platform
  • /path/to/SDL_mixer/lib/x86 for Win32 platform
1 Like

Thank you @Petruska

You are correct!

I hadn’t realised I had downloaded the SDL2_mixer-2.0.4-win32-x64.zip file by mistake.

It works perfectly now with the SDL2_mixer-devel-2.0.4-VC.zip file :smile:

1 Like