What compiler and processor architecture does AMTLAB use?

8 ビュー (過去 30 日間)
Fahimeh Dehghandehnavi
Fahimeh Dehghandehnavi 2022 年 2 月 24 日
コメント済み: Walter Roberson 2023 年 9 月 26 日
Hi all,
I am trying to use C codes in MATLAB windows. My codes are using a dll generated by labview and I can run them through Visual Studio but when calling the C function in MATLAB (through codegen), I get the errors "We don't know the Compiler" and "We don't know the ProcessorType architecture". This is an error from the "platdefines.h" header file generated by labview. I guess MATLAB doesn't use any of these compilers and I need to modify "platdefines.h" so it includes MATLAB compiler as well but I don't know how.
Any comment or advice is truly appreciated!
Please find the related part of "platdefines.h" file here:
#ifdef _WIN64
#define OpSystem kMSWin64
#else
#define OpSystem kMSWin32
#endif
#ifndef WindowSystem
#define WindowSystem kMSWin32WM
#endif
#if defined(__MWERKS__)
#define Compiler kMetroWerks
#elif defined(_MSC_VER) || defined(_NI_VC_)
#define Compiler kVisualC
#elif defined(__SC__) || defined(_NI_SC_)
#define Compiler kSymanCWin
#elif defined(__BORLANDC__) || defined(__BCPLUSPLUS__) || defined(_NI_BC_)
#define Compiler kBorlandC
#else
#error "We don't know the Compiler"
#endif
#ifdef _M_PPC
#define ProcessorType kPPC
#elif defined(_M_IX86)
#define ProcessorType kX86
#elif defined(_M_X64)
#define ProcessorType kX64
#elif defined(_M_ALPHA)
#define ProcessorType kDECAlpha
#elif Compiler == kBorlandC
#define ProcessorType kX86
#elif defined(_ARM_)
#define ProcessorType kARM
#else
#error "We don't know the ProcessorType architecture"
#endif
  6 件のコメント
Kunliang Wang
Kunliang Wang 2023 年 9 月 26 日
Hi there, just wanna check if your problem has been solved. I recently also encountered the same problem. :-( I use MATLAB 2017b and LabVIEW 2018.
Walter Roberson
Walter Roberson 2023 年 9 月 26 日
The problem turned out to be that the installed compiler was too new to be supported by that MATLAB release.

サインインしてコメントする。

回答 (1 件)

Steven Lord
Steven Lord 2022 年 2 月 25 日
The list of supported and compatible compilers for the current release is on this page.
  2 件のコメント
Fahimeh Dehghandehnavi
Fahimeh Dehghandehnavi 2022 年 2 月 27 日
Thank you!
I have Visual Studio 2022 installed. I guess I should use 2019 or earlier then.
Walter Roberson
Walter Roberson 2022 年 2 月 27 日
Yes.

サインインしてコメントする。

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by