unresolved external symbol _wmain


#1

If I compile with nmake or ninja, I get the same error about _wmain

[100%] Linking CXX executable …\bin\aseprite.exe
LINK Pass 1: command “C:\dev\MICROS1\2017\COMMUN1\VC\Tools\MSVC\1414~1.264\bin\Hostx86\x86\link.exe /nologo @cmakefiles\aseprite.dir\objects1.rsp /out:…\bin\aseprite.exe /implib:…\lib\aseprite.lib /pdb:C:\Apps\aseprite\build\bin\aseprite.pdb /version:0.0 /machine:X86 /debug /INCREMENTAL /subsystem:windows -LINK wsetargv.obj -ENTRY:wmainCRTStartup …\lib\app-lib.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib winmm.lib shlwapi.lib psapi.lib wininet.lib comctl32.lib dbghelp.lib …\lib\dio-lib.lib …\lib\filters-lib.lib …\lib\flic-lib.lib …\lib\render-lib.lib …\lib\doc-lib.lib …\lib\fixmath-lib.lib …\lib\ui-lib.lib …\lib\clip.lib …\lib\she.lib …\lib\gfx-lib.lib …\lib\ft-lib.lib …\lib\loadpng.lib …\lib\alleg.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib psapi.lib wininet.lib comctl32.lib C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17134.0\um\x86\dxguid.lib …\lib\pixman.lib …\lib\obs.lib …\lib\undo.lib …\lib\cmark_static.lib …\lib\jpeg.lib …\lib\giflib.lib …\lib\webpdemux.lib …\lib\webpmux.lib …\lib\webp.lib ole32.lib windowscodecs.lib …\lib\freetype.lib …\lib\harfbuzz.lib …\lib\freetype.lib …\lib\harfbuzz.lib …\lib\libpng16_static.lib …\lib\json11.lib …\lib\archive_static.lib …\lib\fmt.lib …\lib\script-lib.lib …\lib\mujs.lib …\lib\updater-lib.lib …\lib\cfg-lib.lib …\lib\net-lib.lib …\lib\laf-base.lib shlwapi.lib dbghelp.lib …\lib\modpbase64.lib …\lib…\libcurl.lib …\lib\zlibstatic.lib ws2_32.lib winmm.lib …\lib\tinyxml.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\aseprite.dir/intermediate.manifest CMakeFiles\aseprite.dir/manifest.res” failed (exit code 1120) with the following output:
LINK : warning LNK4044: unrecognized option ‘/LINK’; ignored
LIBCMT.lib(exe_wmain.obj) : error LNK2019: unresolved external symbol _wmain referenced in function “int __cdecl __scrt_common_main_seh(void)” (?__scrt_common_main_seh@@yahxz)
…\bin\aseprite.exe : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: ‘“C:\Program Files\CMake\bin\cmake.exe”’ : return code ‘0xffffffff’###

Aseprite and System version

Aseprite version: commit hash 139c5aa
System: Windows


#2

Related to https://github.com/aseprite/aseprite/issues/1730

I think that the compilation with Allegro back-end is broken because the new possibility to compile a CLI-only version of Aseprite. I’ll try to fix it soon in the master branch.


#3

That could be it because it worked with skia.