According to the answer to this question, the first method says that you can build it from the source code (provided in the ports folder) which is more flexible than the second option (which can only generate a dynamic library, not a static one).
Me, knowing that I want to compile Mpg123 statically for SDL2 have to go through this so-called painful method to get a static library (only a .lib
and not a .dll
) out of it.
I installed YASM and set it up in the environment variables as it said and tried to build the source code. Unfortunately, for me, it turned out a fail (obviously).
The error is in the form of a single error (a command-line error to be specific) and it is tremendously huge to understand, so can you please help me to understand this error given below (seems that there is absolutely no article on how to build mpg123 from source code, which is the reason for me to turn here for help in the end).
Here comes the "only" error (It is a single error but way too complicated to put inside quoted blocks so it is inside a code snippet...):
Severity Code Description Project File Line Suppression State
Error MSB3073 The command "cl /I "..\..\.." /I "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src" /EP /TC "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src\libmpg123\dct36_3dnow.S" /nologo "Win32\Debug_x86\dct36_3dnow.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "Win32\Debug_x86\dct36_3dnow.o" "Win32\Debug_x86\dct36_3dnow.asm"
cl /I "..\..\.." /I "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src" /EP /TC "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo "Win32\Debug_x86\dct36_3dnowext.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "Win32\Debug_x86\dct36_3dnowext.o" "Win32\Debug_x86\dct36_3dnowext.asm"
cl /I "..\..\.." /I "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src" /EP /TC "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src\libmpg123\dct36_sse.S" /nologo "Win32\Debug_x86\dct36_sse.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "Win32\Debug_x86\dct36_sse.o" "Win32\Debug_x86\dct36_sse.asm"
cl /I "..\..\.." /I "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src" /EP /TC "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo "Win32\Debug_x86\dct64_3dnow.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "Win32\Debug_x86\dct64_3dnow.o" "Win32\Debug_x86\dct64_3dnow.asm"
cl /I "..\..\.." /I "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src" /EP /TC "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src\libmpg123\dct64_3dnowext.S" /nologo "Win32\Debug_x86\dct64_3dnowext.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "Win32\Debug_x86\dct64_3dnowext.o" "Win32\Debug_x86\dct64_3dnowext.asm"
cl /I "..\..\.." /I "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src" /EP /TC "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src\libmpg123\dct64_mmx.S" /nologo "Win32\Debug_x86\dct64_mmx.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "Win32\Debug_x86\dct64_mmx.o" "Win32\Debug_x86\dct64_mmx.asm"
cl /I "..\..\.." /I "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src" /EP /TC "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src\libmpg123\dct64_sse.S" /nologo "Win32\Debug_x86\dct64_sse.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "Win32\Debug_x86\dct64_sse.o" "Win32\Debug_x86\dct64_sse.asm"
cl /I "..\..\.." /I "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src" /EP /TC "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src\libmpg123\dct64_sse_float.S" /nologo "Win32\Debug_x86\dct64_sse_float.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "Win32\Debug_x86\dct64_sse_float.o" "Win32\Debug_x86\dct64_sse_float.asm"
cl /I "..\..\.." /I "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src" /EP /TC "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src\libmpg123\equalizer_3dnow.S" /nologo "Win32\Debug_x86\equalizer_3dnow.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "Win32\Debug_x86\equalizer_3dnow.o" "Win32\Debug_x86\equalizer_3dnow.asm"
cl /I "..\..\.." /I "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src" /EP /TC "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src\libmpg123\getcpuflags.S" /nologo "Win32\Debug_x86\getcpuflags.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "Win32\Debug_x86\getcpuflags.o" "Win32\Debug_x86\getcpuflags.asm"
cl /I "..\..\.." /I "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src" /EP /TC "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src\libmpg123\synth_3dnow.S" /nologo "Win32\Debug_x86\synth_3dnow.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "Win32\Debug_x86\synth_3dnow.o" "Win32\Debug_x86\synth_3dnow.asm"
cl /I "..\..\.." /I "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src" /EP /TC "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src\libmpg123\synth_3dnowext.S" /nologo "Win32\Debug_x86\synth_3dnowext.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "Win32\Debug_x86\synth_3dnowext.o" "Win32\Debug_x86\synth_3dnowext.asm"
cl /I "..\..\.." /I "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src" /EP /TC "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src\libmpg123\synth_i586.S" /nologo "Win32\Debug_x86\synth_i586.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "Win32\Debug_x86\synth_i586.o" "Win32\Debug_x86\synth_i586.asm"
cl /I "..\..\.." /I "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src" /EP /TC "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src\libmpg123\synth_mmx.S" /nologo "Win32\Debug_x86\synth_mmx.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "Win32\Debug_x86\synth_mmx.o" "Win32\Debug_x86\synth_mmx.asm"
cl /I "..\..\.." /I "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src" /EP /TC "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src\libmpg123\synth_sse.S" /nologo "Win32\Debug_x86\synth_sse.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "Win32\Debug_x86\synth_sse.o" "Win32\Debug_x86\synth_sse.asm"
cl /I "..\..\.." /I "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src" /EP /TC "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src\libmpg123\synth_sse_float.S" /nologo "Win32\Debug_x86\synth_sse_float.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "Win32\Debug_x86\synth_sse_float.o" "Win32\Debug_x86\synth_sse_float.asm"
cl /I "..\..\.." /I "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src" /EP /TC "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src\libmpg123\synth_stereo_sse_float.S" /nologo "Win32\Debug_x86\synth_stereo_sse_float.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "Win32\Debug_x86\synth_stereo_sse_float.o" "Win32\Debug_x86\synth_stereo_sse_float.asm"
cl /I "..\..\.." /I "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src" /EP /TC "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src\libmpg123\tabinit_mmx.S" /nologo "Win32\Debug_x86\tabinit_mmx.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "Win32\Debug_x86\tabinit_mmx.o" "Win32\Debug_x86\tabinit_mmx.asm"
cl /I "..\..\.." /I "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src" /EP /TC "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src\libmpg123\synth_sse_accurate.S" /nologo "Win32\Debug_x86\synth_sse_accurate.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "Win32\Debug_x86\synth_sse_accurate.o" "Win32\Debug_x86\synth_sse_accurate.asm"
cl /I "..\..\.." /I "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src" /EP /TC "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src\libmpg123\synth_sse_s32.S" /nologo "Win32\Debug_x86\synth_sse_s32.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "Win32\Debug_x86\synth_sse_s32.o" "Win32\Debug_x86\synth_sse_s32.asm"
cl /I "..\..\.." /I "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src" /EP /TC "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src\libmpg123\synth_stereo_sse_accurate.S" /nologo "Win32\Debug_x86\synth_stereo_sse_accurate.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "Win32\Debug_x86\synth_stereo_sse_accurate.o" "Win32\Debug_x86\synth_stereo_sse_accurate.asm"
cl /I "..\..\.." /I "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src" /EP /TC "D:\SDL2\Dependencies\mpg123-1.25.10\mpg123-1.25.10\ports\MSVC++\2015\win32\libmpg123\..\..\..\..\..\src\libmpg123\synth_stereo_sse_s32.S" /nologo "Win32\Debug_x86\synth_stereo_sse_s32.asm"
yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "Win32\Debug_x86\synth_stereo_sse_s32.o" "Win32\Debug_x86\synth_stereo_sse_s32.asm"
:VCEnd" exited with code 1. libmpg123 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets 128
It can easily be seen that the error is related to YASM in some way but I don't know how?
I have downloaded YASM from here by the way.
EDIT: When I actually tried to compile all the assembly source files using YASM in the Command Prompt, most of them usually said:-
error: instruction not recognized: 'PREPARE_GOT'
error: instruction not recognized: 'GET_GOT'
error: instruction not recognized: 'RESTORE_GOT'
Thank you.