I'm following the examples of c++iface in the folder $NIM_HOME/examples and
[irrlicht tutorial 01](http://irrlicht.sourceforge.net/docu/example001.html).
The interfacing (mainly) worked fine but not in the function that need type
wchar_t. I'm already used WideCString but the compiler gave me those error.
The workaround was by replacing every function call that need wchar_t * with
emit pragma, but is there any better way to do it?
nim snippet
...
device.setWindowCaption(newWideCString("Hello world! - Irrlicht Engine
Demo"))
gui.addStaticText(newWideCString("Hello world! This is Irrlicht software
engine!"),
rect(10, 10, 200, 22), true)
...
I changed it with
{.emit:
[device, """->setWindowCaption(L"Hello world! - Irrlich Engine Demo");
""", gui, """->addStaticText(L"Hello world! This Irrlicht software
engine!",
irr::core::rect<irr::s32>(10, 10, 200, 22), true);
"""].}
Also, the opposite was error too (when calling driver.getName(), the c++
returned a wchar_t * too but cannot be cast to NimStringDesc, NCString, or NI16)
compiler that I used is cl
$ cl /?
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24213.1 for x64
...
Thanks.