フィルターのクリア

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

4 ビュー (過去 30 日間)
Getruda
Getruda 2014 年 5 月 31 日
回答済み: Fahimeh Dehghandehnavi 2022 年 3 月 25 日
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 Center および File ExchangeCall C++ from MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by