Sunday, March 8, 2009

C++ Microsoft Unicode "[Ss]trings"

Ugh, to get console output in a Win32 console application, you use outputdebugstring. The trick to getting it to actually show up in Visual Studio is by having a window named "Immediate Window" open and focused. Of course, this is un-documented. Well it was, I added a comment on the official MS doc page.

ANYWAY, I'm ready to dll-ify the Mandelbrot application. Ro use CUDA and to be interfaceable with other platforms (Java etc.) My Dll must be plain c++. No C# or other reasonable languages. I feel the dread.

I figured out how to get what looks like a dll and an exe from the same solution build. Now, to make it linkable, I must replace the main(int argc, char** argv) function in the Mandelbrot application with something with a different identifier, and with (int argc, _TCHAR* argv[]) parameters.

This stinks. Because of all the macros, templates, and generics, I can't even tell what the hell a _TCHAR is at compile time. So can't I know out which of the type specific conversion functions I might be able to use.

No comments:

Post a Comment