mex compile syntax error
Afficher commentaires plus anciens
Hi,
I am getting alot of syntax errors when, I mex a c++ project, which compiles and run is MVS.
The command:
mex -v -I'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include' -I'c:\Program Files (x86)\Windows Kits\8.0\Include\shared' 'C:\temp\my_mex\CppNamedPipeServer\mexCppNamedPipeServer.cpp'
the errors
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\atlcomcli.h(355) : error C2143: syntax error : missing ')' before '&&'
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\atlcomcli.h(368) : see reference to class template instantiation 'ATL::CComPtr<T>' being compiled
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\atlcomcli.h(355) : error C2143: syntax error : missing ';' before '&&'
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\atlcomcli.h(355) : error C2652: 'ATL::CComPtr<T>' : illegal copy constructor: first parameter must not be a 'ATL::CComPtr<T>'
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\atlcomcli.h(355) : error C2059: syntax error : ')'
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\atlcomcli.h(355) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\atlcomcli.h(360) : error C2143: syntax error : missing ')' before '&&'
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\atlcomcli.h(360) : error C2143: syntax error : missing ';' before '&&'
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\atlcomcli.h(360) : error C2059: syntax error : ')'
...
and many more of these
this is the setup for the compiler.
-> Options file = C:\Users\reltyx3\AppData\Roaming\MathWorks\MATLAB\R2010b\mexopts.bat
MATLAB = C:\Program Files\MATLAB32\R2010b
-> COMPILER = cl
-> Compiler flags:
COMPFLAGS = /c /Zp8 /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD
OPTIMFLAGS = /O2 /Oy- /DNDEBUG
DEBUGFLAGS = /Z7
arguments = -I"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include" -I"c:\Program Files (x86)\Windows Kits\8.0\Include\shared"
Name switch = /Fo
-> Pre-linking commands =
-> LINKER = link
-> Link directives:
LINKFLAGS = /dll /export:mexFunction /LIBPATH:"C:\Program Files\MATLAB32\R2010b\extern\lib\win32\microsoft" libmx.lib libmex.lib libmat.lib /MACHINE:X86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /incremental:NO /implib:"C:\Users\reltyx3\AppData\Local\Temp\mex_dTRrlx\templib.x" /MAP:"mexCppNamedPipeServer.mexw32.map"
LINKDEBUGFLAGS = /DEBUG /PDB:"mexCppNamedPipeServer.mexw32.pdb"
LINKFLAGSPOST =
Name directive = /out:"mexCppNamedPipeServer.mexw32"
File link directive =
Lib. link directive =
Rsp file indicator = @
-> Resource Compiler = rc /fo "mexversion.res"
-> Resource Linker =
any ideas...
thank you very much
2 commentaires
Manyo
le 22 Oct 2012
Kaustubha Govind
le 22 Oct 2012
Perhaps you haven't included all the relevant files, etc? A good exercise might be to try using similar code in a standalone C code and see if it compiles (without MATLAB or MEX).
Réponses (0)
Catégories
En savoir plus sur MATLAB Compiler dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!