0

I transfer the project from visual studio to QT and when the project build - displayed errors. How to fix them without making significant changes in the code?.

cannot convert 'const wchar_t*' to 'TCHAR*'
cannot convert '_TCHAR*' to 'const wchar_t*'
cannot convert 'const wchar_t [15]' to 'TCHAR*'
cannot convert 'TCHAR*' to 'const wchar_t*'
...

Several dozen such errors.

PS It is strange that Google does not have any useful results on this issue.

Dmitriy
  • 161
  • 2
  • 12

1 Answers1

0

does your new build know about TCHAR* ? it is a windows specific 'feature'

Martin Beckett
  • 94,801
  • 28
  • 188
  • 263
  • Yes. tchar.h typedef char TCHAR; – Dmitriy Apr 25 '13 at 17:57
  • I would use Qt string class where ever you can and convert to from the native type when you need to call an external api. TCHAR is almost always a bad idea - even just on windows. – Martin Beckett Apr 25 '13 at 17:58
  • A lot of errors. I need a simple solution. I can't use QT classes, because the application becomes dependent on the QT librarys – Dmitriy Apr 25 '13 at 18:10