1

I have a C source file to build 32 and 64 bit binaries and it builds fine with Visual Studio 2005. When I try to build the same with VS2012 on Windows 2008 Server I get the below Link error. While the 32 bit builds fine, the 64 bit is fails.

I do not have a VS project to build this source instead I use a makefile to build.

msvcrt.lib(gs_support.obj) : error LNK2019: unresolved external symbol __imp_GetTickCount64 referenced in function __security_init_cookie

I have searched and found lot of hits but none seem to help me as the solution/workaround given are for projects created using VS IDE.

I have defined -DWINVER=0x0600 -D_WIN32_WINNT=0x0600

Can someone help please?

Shashi
  • 14,980
  • 2
  • 33
  • 52
  • Thanks. What sort of information you are looking for? – Shashi Aug 21 '13 at 13:55
  • GetTickCount64() is a winapi function that's available in Windows Vista and up. Getting a link error for it is a bit hard to explain, but anything is possible if you cook your own makefiles. The rough diagnostic is that you are linking an outdated version of kernel32.lib – Hans Passant Aug 21 '13 at 14:08
  • Got it resolved. Wrong version of Kernel32 was being picked for 64 bit build. Updated the LIB path to insert C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x64 helped to resolve the issue. Thanks every one. – Shashi Aug 22 '13 at 11:20

1 Answers1

1

Got it resolved. Wrong version of Kernel32.lib was being picked for 64 bit build. It was from an older version of MSSDK. Updated the LIB path to insert C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x64 helped to resolve the issue. Thanks every one.

Shashi
  • 14,980
  • 2
  • 33
  • 52