locked
Problems porting a legacy C++ library with "const char *"

    Question

  • I need some help, i'm trying to "port" a legacy Windows C++ library into a Windows Runtime Component Static Library.

    I am getting hundreds of errors of the this type:

      argument of type "const char *" is incompatible with parameter of type "const wchar_t *"

    Short of a global edit, is there a better solution for this?

    Thursday, April 16, 2015 9:50 PM

Answers

  • Without context it's hard to say. Depending on what the library does you may be able to provide an interface on the edge which takes wchar_t*s and converts them to char*s then calls the internal functions.

    Friday, April 17, 2015 3:20 AM
    Owner

All replies

  • Without context it's hard to say. Depending on what the library does you may be able to provide an interface on the edge which takes wchar_t*s and converts them to char*s then calls the internal functions.

    Friday, April 17, 2015 3:20 AM
    Owner
  • New VS makes unicode as default in compiler. It is good to develop unicode compatible software. You can change the default. 
    Friday, April 17, 2015 11:41 AM