Error C3861: '_tcsdup': identifier not found

This is my first time, and I would like to do a parallel process using the "(non-constant) TCHAR" command line function , like this LPTSTR

LPTSTR szCmdline[] = _tcsdup(TEXT("\C:\\MyProgram_linux_1.1\\MyProgram.exe") );

LPTSTR and other char and string types are discussed here.

The command line argument is passed to CreateProcess, like this

if (!CreateProcess(NULL, szCmdline, /*...*/) ) cout << "ERROR: cannot start CreateProcess" << endl;

And these headers are present

#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <strsafe.h>
#include <direct.h>

When compiling, this is an error:

error C3861: '_tcsdup': identifier not found

Search for this error found the same error, but the solution was specific to using the .NET framework , not explainerror C3861: '_tcsdup'

Not sure if this is related, but there are also error C2059: syntax error : ')'onif (!CreateProcess(NULL, szCmdline, /*...*/) ) cout << "ERROR: cannot start CreateProcess" << endl;

How is this bug fixed? And what happens to this?

, CreateProcess Linux fork() - Visual Studio , g++ fork() - , fork(), , .

+5
2

:

#include <tchar.h>
+5

_tcsdup - , Unicode. (tchar.h), , .

_tcsdump :

  • _strdup
  • _mbsdup
  • _wcsdup

http://msdn.microsoft.com/en-us/library/y471khhc(v=vs.110).aspx

+3

All Articles