I recently started to Learn x64 MASM. I'm using Visual Studio 2022.
I wrote a simple function in assembly ..
.code
funcCall proc
ret
funcCall endp
end
I tried calling it from C++ file:
#include <iostream>
extern "C" int funcCall(int c);
int main()
{
std::cout<<funcCall(5);
}
I get these Errors, But the Tutorial I'm following it works just fine.
1>MSVCRT.lib(error.obj) : error LNK2019: unresolved external symbol strcpy_s referenced in function "void __cdecl _RTC_StackFailure(void *,char const *)" (?_RTC_StackFailure@@YAXPEAXPEBD@Z)
09:55:00:890 1>MSVCRT.lib(error.obj) : error LNK2019: unresolved external symbol strcat_s referenced in function "void __cdecl _RTC_StackFailure(void *,char const *)" (?_RTC_StackFailure@@YAXPEAXPEBD@Z)
09:55:00:890 1>MSVCRT.lib(error.obj) : error LNK2019: unresolved external symbol __stdio_common_vsprintf_s referenced in function _vsprintf_s_l
09:55:00:890 1>MSVCRT.lib(error.obj) : error LNK2001: unresolved external symbol __C_specific_handler_noexcept
09:55:00:890 1>MSVCRT.lib(pdblkup.obj) : error LNK2019: unresolved external symbol __vcrt_GetModuleFileNameW referenced in function "int __cdecl _RTC_GetSrcLine(unsigned char *,wchar_t *,unsigned long,int *,wchar_t *,unsigned long)" (?_RTC_GetSrcLine@@YAHPEAEPEA_WKPEAH1K@Z)
09:55:00:890 1>MSVCRT.lib(pdblkup.obj) : error LNK2019: unresolved external symbol __vcrt_LoadLibraryExW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDllFromInstallPath(void)" (?GetPdbDllFromInstallPath@@YAPEAUHINSTANCE__@@XZ)
How can I fix these ?