How to select compiler if not available on the list provided by mex -setup ??
現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
古いコメントを表示
Hi, i have just downloaded the matlab toolbox:
The mex function is asking me for a compiler. Microsoft Visual C++ express 2010 is already installed. I have followed the instructions of the Mex-setup function which is unable to locate this compiler. How can i compile the few .cpp file i need? Or how can find my compiler? Thanks
採用された回答
Is your system 32 bit Windows or 64 bit?
11 件のコメント
See http://www.mathworks.com/support/compilers/R2011a/win64.html
See also, http://www.mathworks.com/support/solutions/en/data/1-6IJJ3L/?solution=1-6IJJ3L
Thank you!
I am trying it out.
Sorry but i have been through all the steps indicated and I still end up with an error when compiling. All files are in the same folder. Here is the command i put in Matlab:
mex BuildGLTree3DFEX.cpp
C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: 'BuildGLTree3DFEX.cpp' not found.
??? Error using ==> mex at 222 Unable to complete successfully.
To cross-check: the URL you posted first was for a single .m file only. Did you download and unzip the entire archive? In MATLAB, what do you see if you ask
ls BuildGLTree3DFEX.cpp
and
ls B*.*
>> ls BuildGLTree3DFEX.cpp
BuildGLTree3DFEX.cpp not found.
>> ls b**
boot.ini
Well, i don't understand something. do the .cpp files need to be in the bin folder of Matlab?, i have also tried to extract them somewhere else, and i have:
ls BuildGLTree3DFEX.cpp
BuildGLTree3DFEX.cpp
>> mex BuildGLTree3DFEX.cpp
BuildGLTree3DFEX.cpp
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\yvals.h(576) : error C2371: 'char16_t' : redefinition; different basic types
c:\program files\matlab\r2010a\extern\include\matrix.h(330) : see declaration of 'char16_t'
f:\phd\research\snownet data\glenncreek\scan shift\GLTree3DFEX.cpp(119) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
f:\phd\research\snownet data\glenncreek\scan shift\GLTree3DFEX.cpp(120) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
f:\phd\research\snownet data\glenncreek\scan shift\GLTree3DFEX.cpp(121) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
f:\phd\research\snownet data\glenncreek\scan shift\GLTree3DFEX.cpp(141) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
f:\phd\research\snownet data\glenncreek\scan shift\GLTree3DFEX.cpp(142) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
f:\phd\research\snownet data\glenncreek\scan shift\GLTree3DFEX.cpp(143) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
f:\phd\research\snownet data\glenncreek\scan shift\GLTree3DFEX.cpp(235) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
f:\phd\research\snownet data\glenncreek\scan shift\GLTree3DFEX.cpp(255) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
f:\phd\research\snownet data\glenncreek\scan shift\GLTree3DFEX.cpp(276) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
BuildGLTree3DFEX.cpp(29) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
BuildGLTree3DFEX.cpp(35) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: Compile of 'BuildGLTree3DFEX.cpp' failed.
??? Error using ==> mex at 222
Unable to complete successfully.
Looks a little bit better...
The files do not need to be in the bin folder (and being there is a bad idea), but you _do_ have to be cd()'d to the directory they are in.
For the other matter, see the solutions here:
http://www.mathworks.com/matlabcentral/newsreader/view_thread/281754
And yes, i have unzip the entire archive.
Sorry, but i am not very familiar yet with programming out of Matlab. So there are few explanation on the page you just gave, but very unclear to me.
Neither in the file yvals.h nor matrix.h there is a command line
namespace mat
If i follow instruction given by Fifo, the line number he gave seems irrelevant to me for the file matrix.h. Which solution should i follow?
I would suggest doing it the way Venn suggests. Go in to yvals.h and find the line that has
#include <matrix.h>
and change it to
namespace mat {
#include <matrix.h>
}
yvals.h does not have such line. I have posted a question for Venn, hopefully he will answer me.
Thanks a lot!
その他の回答 (1 件)
Simon
2011 年 6 月 21 日
it is a Windows 64bit with Matlab 2010a installed.
カテゴリ
ヘルプ センター および File Exchange で MATLAB Compiler についてさらに検索
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
