The full error message is as followed:
1>c:\program files (x86)\matlab\r2008a\extern\include\matrix.h(345): error C2371: 'char16_t' : redefinition; different basic types
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\yvals.h(576) : see declaration of 'char16_t'
I found two method to solve this problem from web:
1. Put all the Matlab related code into a namespace;
2. Insert a simple code like the follows:
1: #include "fminlbfgs.h"2: #include "DemonEnergy.h"3: //**********************************************4: #ifdef _CHAR16T
5: #define CHAR16_T6: #endif7: //**********************************************8: #include "Optimizer\libOptimizer.h"In the above code segment, “#include "Optimizer\libOptimizer.h"” is the header file of MCC generated library.
No comments:
Post a Comment