Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

got

hello.c:34: error: invalid initializer

from

AECHAR szBuf1[] = L"Enter an artist name or";

it can not take L, is the compiler did not include brew header file? thanks

Try STRTOWSTR()

Try STRTOWSTR()

The string is composed of wchar_ts, not AECHARs, and wchar_t is 32 bits by default with GCC. You need to compile with -fshort-wchar and use a cast. And I'm not sure if you can initialize an array like that, so you might need to use a pointer instead.

The string is composed of wchar_ts, not AECHARs, and wchar_t is 32 bits by default with GCC. You need to compile with -fshort-wchar and use a cast. And I'm not sure if you can initialize an array like that, so you might need to use a pointer instead.