필터 지우기
필터 지우기

Why do I get an error when I compile a C++ file with a line using namespace System?

조회 수: 2 (최근 30일)
I have the CC++ file that works perfectly on Microsoft Visual. Trying to run and complile it Matlab and got many errors. The attached lines i.e using namespace System; using namespace System::Runtime::InteropServices;
Gave out the following errors D:\Semproj\USB\protocol.cpp(13) : error C2871: 'System' : a namespace with this name does not exist
D:\Semproj\USB\protocol.cpp(14) : error C2653: 'System' : is not a class or namespace name
  댓글 수: 1
Tushar Sinha
Tushar Sinha 2014년 6월 20일
Are you using a "C++ MEX file" in MATLAB or are you directly trying to use the C++ file from Microsoft Visual?
If you are using "C++ MEX file", then can you paste the verbose output of the mex command?
>>mex -v mexfilename

댓글을 달려면 로그인하십시오.

답변 (1개)

Fahimeh Dehghandehnavi
Fahimeh Dehghandehnavi 2022년 3월 25일
Hey, was wondering if you could sole this issue. I'm having the same problem!

카테고리

Help CenterFile Exchange에서 Call C++ from MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by