Quote Originally Posted by FastCode2010 View Post
The errors by Dev C++

------------------------

4: error: `CString' was not declared in this scope
4: error: `CString' was not declared in this scope
5: error: initializer expression list treated as compound expression
5: error: expected `,' or `;' before '{' token
In function `int main()':
41: error: `CreateShortCut' cannot be used as a function

Execution terminated
Well, as I can see the problem is CString only (all further ones are caused by that), and it has nothing to do with shell link. You have to provide an implementation of CString class, or otherwise go with some other string implementation.

Code:
#include <comdef.h> // for _bstr_t
BOOL CreateShortCut(LPCTSTR file , LPCTSTR shortCut)
. . .
hr = pIPF->Save(_bstr_t(shortCut),FALSE); 
. . .