How can I resolve C2733 Linking Error in Visual Studio

349 views Asked by At

I've been trying to compile the Adaptive Communications Environment (ACE) project in MS Visual Studio 17 2022, but have been getting a slew of related linking errors.

Below is an example:

1>C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.33.31629\include\cstdlib(23,41): error C2733: 'abs': you cannot overload a function with 'extern "C"' linkage
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_math.h(464,38): message : see declaration of 'abs'

This issue is obviously not originating in the ACE code, but in the code bundled in with the build tools.

My guess is there is a clash between MSVC 14.33.31629 and Windows Kit 10.

Does any one have any suggestions on a fix? Is there a compiler or pre-processor flag I can use to mitigate this? Should I use different versions of the MS Build Tool or Windows Kit?

1

There are 1 answers

0
Steve D. On

I resolved this by upgrading my Windows SDK to version 10.0.20348.0.