outputDebugPrintf problem


I’m having trouble specifying the format string for Logger::outputDebugPrintf.

Seems to me you should be able to call it as follows.

Logger::outputDebugPrintf("test %d passed\n", i);

c:\svn\proj\src\cryptrsatojucersa\ssmemoryblock.cpp(109) : error C2664: ‘juce::Logger::outputDebugPrintf’ : cannot convert parameter 1 from ‘const char [16]’ to 'const juce::tchar *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

However, as you can see, that fails.

Logger::outputDebugPrintf((const tchar *)"test %d passed\n", i);

With the cast, the compiler is happy, but the resulting output is garbage.

Is this a bug, or am I forgetting something super basic?


try using the T() macro around the quoted string. e.g.