From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

MATLAB 2014a Default mex compiler is Visual C++ 2013. How to change it?

Solved!
Go to solution

Dear colleagues,

My development machine is running Windows 8.1 x64 , NI LabVIEW 2014 with NI Veristand , MATLAB 2014a and Visual Studio 2013. Those are university requirements so I can't uninstall any of them for the time being.

 

NI Veristand is recognized in MATLAB as shown below:

Veristand.PNG

 

From the compatibility guide, I found out that NI Veristand is only compatible with Visual C++ 2010 or below as shown :

Compatibility.PNG

 

Which means VC++ 2013 is not supported as it is installed by default with my version of VS 2013 premium.

 

The problem is although I downloaded and installed VC++ 2010 and updated it to SP1 as shown:

VC.PNG

 

MATLAB always shows VC++ 2013 Professional as default mex compiler. I don't know if you hold a solution to this problem and why VC++ 2013 is not supported.

 

MATLAB.PNG

 

 

Is there any known workaround to use VC++ 2010 compiler while 2013 version is installed? Thanks millions of times both NI Team and community members have been always there for me and others.

 

Have a wonderful day

 

Waleed El-Badry MSc.,MCPD, ISTQB Certified Tester
Assistant Lecturer
Mechatronics Department
Faculty of Engineering
Misr University for Science & Technology



View Waleed El-Badry's profile on LinkedIn

0 Kudos
Message 1 of 3
(7,913 Views)

Hello Waleed,

 

The NI VeriStand Model Framework will automatically attempt to locate the latest and compatible MSVC++ compiler installed on your system - regardless of the mex-configuration. I would advice to configure MEX with whichever compiler you choose in order to provide a smooth experience when simulating models in the Simulink environment. However, for compilation of models, you simply need to install MSVS 2008\2010 or SDK 7.0\1.1 and our build scripts will automatically detect and select the latest compatible version.

 

You can determine the compiler selected by our scripts by locating a string printed in the MATLAB Command Window similar to the one shown below:

 

  • For SDK 7.0 and MSVS 2008
    NI VeriStand ==> Using the Microsoft Visual C++ 9.0 tools.

 

  • For SDK 7.1 and MSVS 2010
    NI VeriStand ==> Using the Microsoft Visual C++ 10.0 tools.
Nestor
Message 2 of 3
(7,873 Views)
Solution
Accepted by wbadry

Thanks Nestor for your response.

 

After posting question on MATLAB Answers as well, Both answers made me figuring it out as the following:

  • I removed all VC 2010 products (Express edition, distros, updates) from programs and features.
  • I downloaded and installed Windows 7 SDK (it has 64 bit compiler which express edition lacks).
  • I then downloaded VC++ 2010 express edition ( it has the tool chain needed by compiler).
  • I eventually updated VC++ 2010 SP1 (web installer) as Windows Update always fails to do so.

After that, I tested many simple examples including the sine offset and delay. It was compiled well and easily imported to LabVIEW.

Waleed El-Badry MSc.,MCPD, ISTQB Certified Tester
Assistant Lecturer
Mechatronics Department
Faculty of Engineering
Misr University for Science & Technology



View Waleed El-Badry's profile on LinkedIn

0 Kudos
Message 3 of 3
(7,827 Views)