Consider the following scenario:
For example, the void function (enum eType) method is generated as void function (enum meType) in the .tli file.
Note The .tli file and the .tlh file are generated automatically when you compile the project.
Additionally, you receive one of the following error messages when this issue occurs:
- You have a Microsoft Visual C++ project that contains a C++\CLI source file in Microsoft Visual Studio 2010. The source file runs the #import directive against a large type library (.tlb) file.
- The .tlb file stores information for a COM object that includes a method that contains an enum parameter or an enum return value. For example, the COM object contains the following method:
void function (enum eType)
- You enable the /CLR switch for the C++\CLI source file.
- You try to compile the project in Visual Studio 2010 or by using the command prompt.
For example, the void function (enum eType) method is generated as void function (enum meType) in the .tli file.
Note The .tli file and the .tlh file are generated automatically when you compile the project.
Additionally, you receive one of the following error messages when this issue occurs:
error C2371: '<identifier>' : redefinition; different basic types
error C2556: '<identifier1>' : overloaded function differs only by return type from '<identifier2>'
error C2511: '<identifier>' : overloaded member function not found in '<class>'
error C2556: '<identifier1>' : overloaded function differs only by return type from '<identifier2>'
error C2511: '<identifier>' : overloaded member function not found in '<class>'