-1

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?

Zoe
  • 27,060
  • 21
  • 118
  • 148
Steve D.
  • 17
  • 2
  • _"...This issue is obviously not originating in the ACE code..."_ Please create a new project and make a [mcve]. – Richard Critten Sep 23 '22 at 12:47
  • The project I'm attempting to compile was downloaded from https://download.dre.vanderbilt.edu/ (ACE.zip: ACE only (zip format)) – Steve D. Sep 23 '22 at 12:55
  • The project (ACE_vs2019.vcxproj) is ultimately unpacked to C:\ACE_wrappers\ace – Steve D. Sep 23 '22 at 12:55
  • _"...My guess is there is a clash between MSVC 14.33.31629 and Windows Kit 10...."_ the [mcve] is to investigate this suspicion. If correct, then there is no need to get ACE to investigate this issue. – Richard Critten Sep 23 '22 at 12:58
  • Does this answer your question? [error C2733 second C linkage of overloaded function 'function' not allowed](https://stackoverflow.com/questions/7840203/error-c2733-second-c-linkage-of-overloaded-function-function-not-allowed) – Minxin Yu - MSFT Sep 26 '22 at 05:39
  • I haven't been able to reproduce the issue in a simple program. Unfortunately, that solution doesn't help me. The issue seems to be in the MSVC code conflicting with itself, and I'm ver reluctant to go mucking in there. I'm not getting the C2733 just for abs(), but for pretty much every math function: acos(), acosh(), asin(), asinh(), atan(), atan2(), ceil(), floor(), cos(), sin(), max(), etc. I just left all of that off in the interest of reducing clutter. – Steve D. Sep 26 '22 at 17:24
  • I have another project that experiences the same errors. I can't share that here due to an NDA. The funny thing is that the files that complain are not using most if any of these calls, so the linker is finding multiple definitions are wrapping itself around the axle. – Steve D. Sep 26 '22 at 17:24

1 Answers1

1

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

Steve D.
  • 17
  • 2