Hello,

I was compiling some code and get the following compiler errors:
error C3861: '_stprintf_s': identifier not found
error C3861: '_tcscat_s': identifier not found

I got the code from the MSDN Library:
http://msdn.microsoft.com/en-us/library/dd798640%28VS.85%29.aspx

I tried to find some info about the _stprintf_s and added the header <tchar.h>

This got rid of the Compiler Errors but I now have one linker error:
error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup

Is there a .lib file or something I need to add to the project? Or am I missing something else?

Thanks,

Sam

make sure you include stdio.h and that you add main() function. The code in your link is not a complete program.

Edited 6 Years Ago by Ancient Dragon: n/a

Thanks for the reply...
I solved the problem by just removing the whole external window and the _strpintf_s etc and replacing it with a simple printf statement to print it to the console window. But yes adding the int main resolved the linker error (Don't know how I missed it the first time:)

Sam

This question has already been answered. Start a new discussion instead.