From: Venn Ravichandran on
Hello,

I have the same problem too. I am using VS2010 with MATLAB 2008b. Here is the exact error message:
c:\program files\matlab\r2008b\extern\include\matrix.h(346): error C2371: 'char16_t' : redefinition; different basic types
c:\program files\microsoft visual studio 10.0\vc\include\yvals.h(576) : see declaration of 'char16_t'


"Chee Pin " <cpcheam(a)gmail.com> wrote in message <hs9gt9$cn1$1(a)fred.mathworks.com>...
> Hi,
>
> I am trying to compile C dll deployment matlab code with vs2010 and i run into the error below:
>
> error C2371: 'char16_t' : redefinition; different basic types
>
> May I know if there is a way to avoid this. I am using MCR 7.11
>
> Thank you.
From: Venn Ravichandran on
Hello,

I figured out how to get rid of the problem by using namespaces.

I placed #include <matrix.h> inside its own namespace as below:

namespace mat {
#include <matrix.h>
}



"Venn Ravichandran" <vennjr(a)u.northwestern.edu> wrote in message <i1n15p$2uc$1(a)fred.mathworks.com>...
> Hello,
>
> I have the same problem too. I am using VS2010 with MATLAB 2008b. Here is the exact error message:
> c:\program files\matlab\r2008b\extern\include\matrix.h(346): error C2371: 'char16_t' : redefinition; different basic types
> c:\program files\microsoft visual studio 10.0\vc\include\yvals.h(576) : see declaration of 'char16_t'
>
>
> "Chee Pin " <cpcheam(a)gmail.com> wrote in message <hs9gt9$cn1$1(a)fred.mathworks.com>...
> > Hi,
> >
> > I am trying to compile C dll deployment matlab code with vs2010 and i run into the error below:
> >
> > error C2371: 'char16_t' : redefinition; different basic types
> >
> > May I know if there is a way to avoid this. I am using MCR 7.11
> >
> > Thank you.
From: Chee Pin on
Are you able to make the code to work? I am running into mxCreateString returning NULL all the time...

Chee Pin
From: Leo Steenson on
Hi,

Did you add the

namespace mat {
#include <matrix.h>
}

to the start of both the header file and source file? I am getting the exact same error trying to compile an example for using c++ to work with matlab (opencv example). Could you show me your actual code? I am very new to c++ so any help would be much appreciated.

Leo



"Venn Ravichandran" <vennjr(a)u.northwestern.edu> wrote in message <i1n1gv$osu$1(a)fred.mathworks.com>...
> Hello,
>
> I figured out how to get rid of the problem by using namespaces.
>
> I placed #include <matrix.h> inside its own namespace as below:
>
> namespace mat {
> #include <matrix.h>
> }
>
>
>
> "Venn Ravichandran" <vennjr(a)u.northwestern.edu> wrote in message <i1n15p$2uc$1(a)fred.mathworks.com>...
> > Hello,
> >
> > I have the same problem too. I am using VS2010 with MATLAB 2008b. Here is the exact error message:
> > c:\program files\matlab\r2008b\extern\include\matrix.h(346): error C2371: 'char16_t' : redefinition; different basic types
> > c:\program files\microsoft visual studio 10.0\vc\include\yvals.h(576) : see declaration of 'char16_t'
> >
> >
> > "Chee Pin " <cpcheam(a)gmail.com> wrote in message <hs9gt9$cn1$1(a)fred.mathworks.com>...
> > > Hi,
> > >
> > > I am trying to compile C dll deployment matlab code with vs2010 and i run into the error below:
> > >
> > > error C2371: 'char16_t' : redefinition; different basic types
> > >
> > > May I know if there is a way to avoid this. I am using MCR 7.11
> > >
> > > Thank you.
From: Fifo on
"Venn Ravichandran" <vennjr(a)u.northwestern.edu> wrote in message <i1n15p$2uc$1(a)fred.mathworks.com>...
> Hello,
>
> I have the same problem too. I am using VS2010 with MATLAB 2008b. Here is the exact error message:
> c:\program files\matlab\r2008b\extern\include\matrix.h(346): error C2371: 'char16_t' : redefinition; different basic types
> c:\program files\microsoft visual studio 10.0\vc\include\yvals.h(576) : see declaration of 'char16_t'

Very, Very simple.

Go to line 346 of
c:\program files\matlab\r2008b\extern\include\matrix.h

and change it with what you have in line 576 of
c:\program files\microsoft visual studio 10.0\vc\include\yvals.h

Than everything will work fine.
 |  Next  |  Last
Pages: 1 2
Prev: meditor.exe
Next: What does this mean???