Technote (troubleshooting)
Problem(Abstract)
Attempts to compile code with IBM Rational Rhapsody 8 on Windows 7 using Microsoft Visual Studio 2008 results in the error "error C2664: 'SetDlgItemTextA'".
Symptom
The full error message is as follows:
FOO.cpp(574) : error C2664: 'SetDlgItemTextA' : cannot convert
parameter 3 from 'wchar_t [256]' to 'LPCSTR'
Cause
This is due to the CPP_CG::MSVC::CompileSwitches property value having the /D _UNICODE switch set.
Resolving the problem
Change the switch from:
"/D _UNICODE"
to
"/D UNICODE"
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.