Hundreds of linker errors not even related to my program.

Tony Blake 0 Reputation points
2025-11-06T16:27:05.1266667+00:00

Okay, since microsoft loves messing things up and intruding on people, maybe you can fix this mess from your VS. I have hundreds of linker errors suddenly start appearing from a development that was working fine until I decided to include a dropdown box. None of them have anything to do with what I am doing, I have even removed the headers from the file and now I just can not compile my program because of these stupid errors. I have tried to set the hardware identifier in the properties and hardcoded in #pragma. I have already started to convert the whole program to a non windows console and frankly at this point, I am seriously considering just migrating all my OS to linux. And before you ask, no, you are not having my code.

'std::_Function_args<_Ret(_Types...) volatile const &>': class template has already been defined

more than one instance of overloaded function "__writecr0" has 'C' linkage

more than one instance of overloaded function "__writecr2" has 'C' linkage

more than one instance of overloaded function "__writecr3" has 'C' linkage

more than one instance of overloaded function "__writecr4" has 'C' linkage

more than one instance of overloaded function "__writecr8" has 'C' linkage

more than one instance of overloaded function "__writedr" has 'C' linkage

more than one instance of overloaded function "__writeeflags" has 'C' linkage

cannot overload functions distinguished by return type alone

cannot overload functions distinguished by return type alone

cannot overload functions distinguished by return type alone

cannot overload functions distinguished by return type alone

cannot overload functions distinguished by return type alone

cannot overload functions distinguished by return type alone

cannot overload functions distinguished by return type alone

'__stosb': identifier not found

'__readgsqword': identifier not found

'__readgsqword': identifier not found

'__stosb': identifier not found

'__readgsqword': identifier not found

'__readgsqword': identifier not found

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...)>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) const>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) volatile>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) volatile const>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) &>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) const &>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) volatile &>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) volatile const &>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) &&>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) const &&>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) volatile &&>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) volatile const &&>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept const>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept volatile>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept volatile const>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept &>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept const &>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept volatile &>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept volatile const &>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept &&>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept const &&>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept volatile &&>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept volatile const &&>': class template has already been defined

'std::result_of<_Callable(_Args...)>': class template has already been defined

'std::_Function_args<_Ret(_Types...)>': class template has already been defined

'std::_Function_args<_Ret(_Types...) const>': class template has already been defined

'std::_Function_args<_Ret(_Types...) volatile>': class template has already been defined

'std::_Function_args<_Ret(_Types...) volatile const>': class template has already been defined

'std::_Function_args<_Ret(_Types...) &>': class template has already been defined

'std::_Function_args<_Ret(_Types...) const &>': class template has already been defined

'std::_Function_args<_Ret(_Types...) volatile &>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...)>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) const>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) volatile>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) volatile const>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) &>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) const &>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) volatile &>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) volatile const &>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) &&>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) const &&>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) volatile &&>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) volatile const &&>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept const>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept volatile>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept volatile const>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept &>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept const &>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept volatile &>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept volatile const &>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept &&>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept const &&>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept volatile &&>': class template has already been defined

'std::_Is_memfunptr<_Ret(_Arg0::* )(_Types...) noexcept volatile const &&>': class template has already been defined

'std::result_of<_Callable(_Args...)>': class template has already been defined

'std::_Function_args<_Ret(_Types...)>': class template has already been defined

'std::_Function_args<_Ret(_Types...) const>': class template has already been defined

'std::_Function_args<_Ret(_Types...) volatile>': class template has already been defined

'std::_Function_args<_Ret(_Types...) volatile const>': class template has already been defined

'std::_Function_args<_Ret(_Types...) &>': class template has already been defined

'std::_Function_args<_Ret(_Types...) const &>': class template has already been defined

'std::_Function_args<_Ret(_Types...) volatile &>': class template has already been defined

'std::_Function_args<_Ret(_Types...) volatile const &>': class template has already been defined

'_InterlockedExchange': function does not take 1 arguments

'_InterlockedCompareExchange': function does not take 1 arguments

'_InterlockedExchange': function does not take 1 arguments

'_InterlockedCompareExchange': function does not take 1 arguments

'type cast': cannot convert from 'PVOID' to 'LONG'

'type cast': cannot convert from 'PVOID' to 'LONG'

'type cast': cannot convert from 'PVOID' to 'LONG'

'type cast': cannot convert from 'PVOID' to 'LONG'

'type cast': cannot convert from 'PVOID' to 'LONG'

'type cast': cannot convert from 'PVOID' to 'LONG'

function 'PVOID GetCurrentFiber(void)' already has a body

function 'PVOID GetFiberData(void)' already has a body

function '_TEB *NtCurrentTeb(void)' already has a body

function 'PVOID GetCurrentFiber(void)' already has a body

function 'PVOID GetFiberData(void)' already has a body

function '_TEB *NtCurrentTeb(void)' already has a body

error count exceeds 100; stopping compilation

error count exceeds 100; stopping compilation

Developer technologies | Visual Studio | Debugging
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Varsha Dundigalla(INFOSYS LIMITED) 3,725 Reputation points Microsoft External Staff
    2025-11-07T13:16:34.13+00:00

    Thank you for reaching out.

    This error pattern is different from a normal linker issue caused by missing symbols. What you’re seeing indicates duplicate definitions of standard library templates and low-level intrinsics, which usually happens because of a configuration or environment conflict not because of the dropdown code itself. Adding UI elements likely triggered inclusion of headers that exposed these conflicts.

    To fix it quickly:

    1. Clean and rebuild the solution to remove stale precompiled headers and object files.
    2. Ensure all projects use the same runtime library (/MD or /MT) under Project Properties → C/C++ → Code Generation.
    3. Remove any custom #define or #pragma that changes linkage or calling conventions.
    4. Check include paths in VC++ Directories—make sure there are no duplicate or outdated Windows SDK paths.
    5. Temporarily disable precompiled headers and rebuild.
    6. Delete any copied system headers from your project folder; rely only on official SDK headers.
    7. Confirm platform settings (x86 vs x64) and avoid mixing /clr with native code unless required.

    If it still fails, repair Visual Studio and Windows SDK. These steps usually resolve duplicate template and intrinsic conflicts.

    References:

    https://learn.microsoft.com/en-us/cpp/build/reference/md-mt-ld-use-run-time-library https://learn.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-error-lnk2005

    Please let us know if you require any further assistance, we’re happy to help.

    If you found this information useful, kindly mark this as "Accept Answer".


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.