After trying to build this simple program:
#include <iostream>
#include <cstdlib>
using namespace std;
void main()
{
int a = 6;
cout << a << endl;
}
I get many "unresolved external symbol" errors:
LNK1120 12 unresolved external errors
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol strcat_s referenced in function "void __cdecl _RTC_StackFailure(void *,char const *)" (?_RTC_StackFailure@@YAXPEAXPEBD@Z) CPP C:Documents\VSCPP\CPP\CPP\MSVCRTD.lib(_error_.obj) 1
Error LNK2019 unresolved external symbol strcpy_s referenced in function "void __cdecl _RTC_StackFailure(void *,char const *)" (?_RTC_StackFailure@@YAXPEAXPEBD@Z) CPP C:Documents\VSCPP\CPP\CPP\MSVCRTD.lib(_error_.obj) 1
Error LNK2019 unresolved external symbol wcscpy_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned __int64)" (?GetPdbDllPathFromFilePath@@YAHPEB_WPEA_W_K@Z) CPP C:Documents\VSCPP\CPP\CPP\MSVCRTD.lib(_pdblkup_.obj) 1
Error LNK2019 unresolved external symbol _CrtDbgReport referenced in function _CRT_RTC_INIT CPP C:Documents\VSCPP\CPP\CPP\MSVCRTD.lib(_init_.obj) 1
Error LNK2019 unresolved external symbol _CrtDbgReportW referenced in function _CRT_RTC_INITW CPP C:Documents\VSCPP\CPP\CPP\MSVCRTD.lib(_init_.obj) 1
Error LNK2019 unresolved external symbol _wmakepath_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned __int64)" (?GetPdbDllPathFromFilePath@@YAHPEB_WPEA_W_K@Z) CPP C:Documents\VSCPP\CPP\CPP\MSVCRTD.lib(_pdblkup_.obj) 1
Error LNK2019 unresolved external symbol _wsplitpath_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned __int64)" (?GetPdbDllPathFromFilePath@@YAHPEB_WPEA_W_K@Z) CPP C:Documents\VSCPP\CPP\CPP\MSVCRTD.lib(_pdblkup_.obj) 1
Error LNK2001 unresolved external symbol __C_specific_handler CPP C:Documents\VSCPP\CPP\CPP\MSVCRTD.lib(_error_.obj) 1
Error LNK2019 unresolved external symbol __stdio_common_vsprintf_s referenced in function _vsprintf_s_l CPP C:Documents\VSCPP\CPP\CPP\MSVCRTD.lib(_error_.obj) 1
Error LNK2019 unresolved external symbol __vcrt_GetModuleFileNameW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll@@YAPEAUHINSTANCE__@@XZ) CPP C:Documents\VSCPP\CPP\CPP\MSVCRTD.lib(_pdblkup_.obj) 1
Error LNK2019 unresolved external symbol __vcrt_GetModuleHandleW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll@@YAPEAUHINSTANCE__@@XZ) CPP C:Documents\VSCPP\CPP\CPP\MSVCRTD.lib(_pdblkup_.obj) 1
Error LNK2019 unresolved external symbol __vcrt_LoadLibraryExW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll@@YAPEAUHINSTANCE__@@XZ) CPP C:Documents\VSCPP\CPP\CPP\MSVCRTD.lib(_pdblkup_.obj) 1
What is causing this and how this can be fixed?