Message 1 of 2
Visual Studio 2017 compile error(C2664) when enable the Conformance mode
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Condition:
Visual Studio 2017(15.5 or later versions).
Issue:
When you create a new C++ project from scratch for Inventor(for standalone application or addin), and include the InventorUtils.h file:
#include "InventorUtils.h"
then compile it you will see the C2664 errors like:
'LPOLESTR T2OLE(LPTSTR)': cannot convert argument 1 from 'const wchar_t [16]' to 'LPTSTR'
Solution:
On the project Property Pages, disable the Conformance mode(C/C++->Language->Conformance mode):
If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.

Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.