From: James Tursa on 27 Mar 2010 15:15 "Aditya " <adityapatel.2006(a)gmail.com> wrote in message <holgm1$1vk$1(a)fred.mathworks.com>... > "James Tursa" <aclassyguy_with_a_k_not_a_c(a)hotmail.com> wrote in message <hoj05p$qoi$1(a)fred.mathworks.com>... > > "Aditya " <adityapatel.2006(a)gmail.com> wrote in message <hoisnl$qus$1(a)fred.mathworks.com>... > > > > > > Can you suggest me ,what could be the problem? I am attaching the necessary files in the linker input properties (all the lib files necessary) and all the header files. > > > > > > I am using Maltlab r2009a and visual studio 2008 on a 64 bit vista system. > > > > I always compile with the mex command at the MATLAB prompt. How are you doing the compile? > > > > James Tursa > > I wajs running the code as a project in visual studio. Can you explain how to compile with the mex command and run it? > > thanks Here is how I typically compile an engine application from the MATLAB command line: mex -setup (then select a C/C++ compiler from the list) options = [matlabroot '\bin\win32\mexopts\msvc80engmatopts.bat']; mex('-f', options, '-v', 'file1.c', 'file2.c'); Then run it like this: !file1 The above assumes that you have a supported C/C++ compiler that shows up in the mex -setup list. James Tursa
From: Aditya on 27 Mar 2010 19:10 "James Tursa" <aclassyguy_with_a_k_not_a_c(a)hotmail.com> wrote in message <hollge$96s$1(a)fred.mathworks.com>... > "Aditya " <adityapatel.2006(a)gmail.com> wrote in message <holgm1$1vk$1(a)fred.mathworks.com>... > > "James Tursa" <aclassyguy_with_a_k_not_a_c(a)hotmail.com> wrote in message <hoj05p$qoi$1(a)fred.mathworks.com>... > > > "Aditya " <adityapatel.2006(a)gmail.com> wrote in message <hoisnl$qus$1(a)fred.mathworks.com>... > > > > > > > > Can you suggest me ,what could be the problem? I am attaching the necessary files in the linker input properties (all the lib files necessary) and all the header files. > > > > > > > > I am using Maltlab r2009a and visual studio 2008 on a 64 bit vista system. > > > > > > I always compile with the mex command at the MATLAB prompt. How are you doing the compile? > > > > > > James Tursa > > > > I wajs running the code as a project in visual studio. Can you explain how to compile with the mex command and run it? > > > > thanks > > Here is how I typically compile an engine application from the MATLAB command line: > > mex -setup > (then select a C/C++ compiler from the list) > options = [matlabroot '\bin\win32\mexopts\msvc80engmatopts.bat']; > mex('-f', options, '-v', 'file1.c', 'file2.c'); > > Then run it like this: > > !file1 > > The above assumes that you have a supported C/C++ compiler that shows up in the mex -setup list. > > James Tursa Thanks So so what is file2.c in the command.. Also how can i do the data transfer with this? I was in the expression that i have to run it in visual studio.
From: Aditya on 9 Apr 2010 21:41
"Aditya " <adityapatel.2006(a)gmail.com> wrote in message <hom38h$lso$1(a)fred.mathworks.com>... > "James Tursa" <aclassyguy_with_a_k_not_a_c(a)hotmail.com> wrote in message <hollge$96s$1(a)fred.mathworks.com>... > > "Aditya " <adityapatel.2006(a)gmail.com> wrote in message <holgm1$1vk$1(a)fred.mathworks.com>... > > > "James Tursa" <aclassyguy_with_a_k_not_a_c(a)hotmail.com> wrote in message <hoj05p$qoi$1(a)fred.mathworks.com>... > > > > "Aditya " <adityapatel.2006(a)gmail.com> wrote in message <hoisnl$qus$1(a)fred.mathworks.com>... > > > > > > > > > > Can you suggest me ,what could be the problem? I am attaching the necessary files in the linker input properties (all the lib files necessary) and all the header files. > > > > > > > > > > I am using Maltlab r2009a and visual studio 2008 on a 64 bit vista system. > > > > > > > > I always compile with the mex command at the MATLAB prompt. How are you doing the compile? > > > > > > > > James Tursa > > > > > > I wajs running the code as a project in visual studio. Can you explain how to compile with the mex command and run it? > > > > > > thanks > > > > Here is how I typically compile an engine application from the MATLAB command line: > > > > mex -setup > > (then select a C/C++ compiler from the list) > > options = [matlabroot '\bin\win32\mexopts\msvc80engmatopts.bat']; > > mex('-f', options, '-v', 'file1.c', 'file2.c'); > > > > Then run it like this: > > > > !file1 > > > > The above assumes that you have a supported C/C++ compiler that shows up in the mex -setup list. > > > > James Tursa > > Thanks > > So so what is file2.c in the command.. Also how can i do the data transfer with this? > I was in the expression that i have to run it in visual studio. Thanks I was able to compile it in mex file. But now the problem is the data is coming in on a Visual studio C++ project. I need it in Matlab in real time or process (or plot it) using matlab?? |