ned14 / outcome

Provides very lightweight outcome<T> and result<T> (non-Boost edition)
https://ned14.github.io/outcome
Other
704 stars 62 forks source link

Link error on x86 + MSVC #221

Closed QuellaZhang closed 4 years ago

QuellaZhang commented 4 years ago

Hi all,

I use latest version of Outcome, Outcome failed due to link error on x86 build but passed on x64 on MSVC. I want to confirm does Outcome not support x86 build any more? Or it's a source issue? Thanks.

build log: Outcome_x86_build.log

error: MSVCRT.lib(exe_main.obj) : error LNK2019: unresolved external symbol _main referenced in function "int cdecl scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ) .\outcome_hl--issue0064-noexcept.exe : fatal error LNK1120: 1 unresolved externals

ned14 commented 4 years ago

Confirmed. It looks like the linker aliasing tricks to work around recent MSVCs refusing non-windows.h definitions of Windows function are x64-specific. Thanks for reporting the problem.

ned14 commented 4 years ago

I believe that this is now fixed. Thank you for reporting the problem!