IBM Support

Compiling with Rhapsody 8 results in "cannot convert parameter 3 from 'wchar_t [256]' to 'LPCSTR'" error

Technote (troubleshooting)


Attempts to compile code with IBM Rational Rhapsody 8 on Windows 7 using Microsoft Visual Studio 2008 results in the error "error C2664: 'SetDlgItemTextA'".


The full error message is as follows:

FOO.cpp(574) : error C2664: 'SetDlgItemTextA' : cannot convert

parameter 3 from 'wchar_t [256]' to 'LPCSTR'


This is due to the CPP_CG::MSVC::CompileSwitches property value having the /D _UNICODE switch set.

Resolving the problem

Change the switch from:




Document information

More support for: Rational Rhapsody
Rational Rhapsody Developer

Software version: 8.0

Operating system(s): Windows

Reference #: 1615742

Modified date: 13 November 2012