ryanpcmcquen / basque

A top-down 2d game engine, written from scratch in under 1000 lines of C. Development of the game based on this engine is streamed on Twitch: https://www.twitch.tv/ryanpcmcquen
https://ryanpcmcquen.itch.io/basque
Mozilla Public License 2.0
443 stars 24 forks source link

Build error Windows 10 SDL2 2.0.12 #7

Closed ryanpcmcquen closed 4 years ago

ryanpcmcquen commented 4 years ago
clang -Wall -Wextra -std=c99 -I C:\INCLUDE\ source\basque.c -L C:\INCLUDE\SDL2\ -l C:\INCLUDE\sdl2.nuget\build\native\lib\x64\dynamic\SDL2.lib -l C:\INCLUDE\sdl2.nuget\build\native\lib\x64\dynamic\SDL2main.lib -l C:\INCLUDE\sdl2_image.nuget\build\native\lib\x64\dynamic\SDL2_image.lib -l C:\INCLUDE\sdl2_mixer.nuget.\build\native\lib\x64\dynamic\SDL2_mixer.lib -l 
C:\INCLUDE\sdl2_ttf.nuget\build\native\lib\x64\dynamic\SDL2_ttf.lib -Xlinker /SUBSYSTEM:WINDOWS -o basque.exe SDL2main.lib(SDL_windows_main.obj) : error LNK2019: unresolved external symbol __imp_CommandLineToArgvW referenced in function main_getcmdline basque.exe : fatal error LNK1120: 1 unresolved externals clang: error: linker command failed with exit code 1120 (use -v to see invocation) NMAKE : fatal error U1077: 
'"C:\Program Files\LLVM\bin\clang.EXE"' : return code '0x460' Stop.
ryanpcmcquen commented 4 years ago

It's captured in these two builds which have the same source but different SDL2 versions:

2.0.12: https://github.com/ryanpcmcquen/basque/actions/runs/72247849

2.0.10: https://github.com/ryanpcmcquen/basque/actions/runs/63602955

ryanpcmcquen commented 4 years ago

Thanks to @rcgordon for the fix here (-l Shell32)!