0

I'm trying to port a 32bit application to 64bit and have trouble with some interlocked functions, namely: InterlockedIncrement64, Decrement64, Exchange64, CompareExchange64 and ExchangeAdd64.

The error:

error LNK2001: unresolved external symbol "_InterlockedExchange64" C:\path_to_object_file\myclass.obj

I already search for the error and found some threads, but none seemed to work. (E.g. see this)

I checked where kernel32.lib and psapi.lib are (/VERBOSE_LIB) and the solution from the link above did not help (giving full path to psapi.lib in Project->Linker->Additional Dependencies).

I also checked if the Vc++ Directories and especially the library directories did change between Win32-Version and x64, which they should and do.

Thank you for help in advance.

Community
  • 1
  • 1
  • possible duplicate of [What is an undefined reference/unresolved external symbol error and how do I fix it?](http://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – Ken White Jun 16 '15 at 16:57
  • It is declared inline in Winbase.h, very hard to guess why you'd get a linker error. You'll need to show repro code. – Hans Passant Jun 16 '15 at 17:21
  • Some part of the code looks like this: LONGLONG ( * Renamed_InterlockedExchangeAdd)( LONGLONG volatile *Addend, LONGLONG Value ) = InterlockedExchangeAdd64; – Mausweazle Jun 16 '15 at 17:53
  • Could someone help me at this please? The problem still exists. I believe it has something to do with wrong library resolution but i don't know where Visual Studio loads the wrong/missing library. – Mausweazle Jun 30 '15 at 08:33

0 Answers0