How to Automatically detect MicrosoftVisual C++ 2019 v16.0 | nmake (64-bit Windows) toolchain in code generation setting ?

Hi ,
I have set setting for the toolchain "Automatically locate an installed toolchain" so it is selecting MINGW64 | gmake (64-bit windows). Instead of this i want it should detect "MicrosoftVisual C++ 2019 v16.0 | nmake (64-bit Windows)" automatically. I have already installed Microsoft visual c++ 2015-2019 redistributable (x64). check the attached image.
Note: I do not wanted to change " "Automatically locate an installed toolchain", it should detect automatically "MicrosoftVisual C++ 2019 v16.0 | nmake (64-bit Windows)"
Please help on this topic.

 Accepted Answer

Hi Anup,
To debug this problem, Open the System Properties window by right-clicking on "This PC" or "My Computer" and selecting "Properties."Click on "Advanced system settings" and then "Environment Variables."Under "System variables," check if the path to the Microsoft Visual C++ 2019 toolchain is included in the "Path" variable. If not, add it by clicking "New" and entering the path. Then, Open Matlab and go to the "Home" tab. Click on "Environment" and select "Add-Ons" > "Manage Add-Ons." Check if the Microsoft Visual C++ 2019 toolchain is listed. If not, you may need to install it or configure Matlab to recognize it. In Matlab, go to the "Home" tab and click on "Environment" > "Add-Ons" > "Manage Add-Ons." Select "Toolchains" from the left pane and ensure that the Microsoft Visual C++ 2019 toolchain is visible and selected as the default toolchain. Afterwards, check Matlab Compiler Settings, Go to "Home" > "Environment" > "Preferences" > "MATLAB" > "General" > "MATLAB Compiler." Verify that the Microsoft Visual C++ 2019 toolchain is set as the default compiler for building MEX files. After making these changes, restart Matlab to ensure that the new toolchain settings take effect. By following these detailed steps, you can configure Matlab to automatically detect the "Microsoft Visual C++ 2019 v16.0 | nmake (64-bit Windows)" toolchain while keeping the setting for "Automatically locate an installed toolchain" unchanged. This should enable Matlab to use the desired toolchain for compilation and building processes seamlessly.

4 Comments

Hi Umar, Thank you for the reply.
I tried to do what you told, I have some basic question.
  1. Do I need to installed only Microsoft Visual C++ 2019 complete professional package ? bacasue I have only runtime is installed , so is it sufficient ? (Check screenshot attached)
2. For the process which you told, I am not able to see add-ons not in add-ons i able to see toochain in left pane.
Open Matlab and go to the "Home" tab. Click on "Environment" and select "Add-Ons" > "Manage Add-Ons." Check if the Microsoft Visual C++ 2019 toolchain is listed. If not, you may need to install it or configure Matlab to recognize it. In Matlab, go to the "Home" tab and click on "Environment" > "Add-Ons" > "Manage Add-Ons." Select "Toolchains" from the left pane and ensure that the Microsoft Visual C++ 2019 toolchain is visible and selected as the default toolchain.
Please can you confirm on first point.
Hi Anup,
Glad to hear back from you.
Regarding to your query number 1, Do I need to installed only Microsoft Visual C++ 2019 complete professional package ? bacasue I have only runtime is installed , so is it sufficient ?
When it comes to Microsoft Visual C++ 2019, the runtime installation alone may not be sufficient if you are looking to develop applications or work on projects that require the full functionality and features provided by the complete professional package.
The runtime installation primarily includes the necessary components to run applications developed using Visual C++ on a computer where Visual C++ is not installed. It allows users to execute programs that were built using Visual C++ without requiring the complete development environment on the target machine.
However, if you intend to develop applications, write code, or utilize advanced features of Visual C++, it is highly recommended to install the complete professional package. This package includes the Integrated Development Environment (IDE), compilers, libraries, and tools essential for software development using Visual C++.
By installing the complete professional package, you gain access to a comprehensive set of features that enable you to create, debug, and optimize your code efficiently. It provides a robust development environment with advanced capabilities for building various types of applications, from desktop software to web applications.
Now, to address query#2, For the process which you told, I am not able to see add-ons not in add-ons i able to see toochain in left pane.Open Matlab and go to the "Home" tab. Click on "Environment" and select "Add-Ons" > "Manage Add-Ons." Check if the Microsoft Visual C++ 2019 toolchain is listed. If not, you may need to install it or configure Matlab to recognize it. In Matlab, go to the "Home" tab and click on "Environment" > "Add-Ons" > "Manage Add-Ons." Select "Toolchains" from the left pane and ensure that the Microsoft Visual C++ 2019 toolchain is visible and selected as the default toolchain.
To address the concern of not being able to see the Microsoft Visual C++ 2019 toolchain in the Matlab Add-Ons section, I will provide a detailed troubleshooting guide to help you resolve this issue.
Check Add-Ons in Matlab:
Open Matlab and navigate to the "Home" tab. Click on "Environment" and select "Add-Ons" > "Manage Add-Ons." Verify if the Microsoft Visual C++ 2019 toolchain is listed in the available add-ons. If it is not visible, proceed to the next steps. Install or Configure the Toolchain:
If the toolchain is not listed, you may need to install it or configure Matlab to recognize it. In Matlab, go to the "Home" tab and click on "Environment" > "Add-Ons" > "Manage Add-Ons." Select "Toolchains" from the left pane to manage toolchains in Matlab. Ensure that the Microsoft Visual C++ 2019 toolchain is visible in the list of available toolchains. If it is not present, you may need to install the toolchain by following the installation instructions provided by Matlab or Microsoft.
Set Default Toolchain:
Once the Microsoft Visual C++ 2019 toolchain is visible in the list of toolchains, make sure to select it as the default toolchain. This ensures that Matlab uses the specified toolchain for compilation and building processes.
By following these steps, you should be able to troubleshoot the issue of the missing Microsoft Visual C++ 2019 toolchain in the Matlab Add-Ons section. Let me know if you need further assistance.
Hi Umar,
Thank you for your detailed explanation. I will follow the process which you told and if anything needed will ask you. But Thank you again , Have a nice day..!
Hi Anup,
Thank you for your kind words and confirmation of your intention to follow the outlined process. I'm glad the explanation was helpful to you. Please don't hesitate to reach out if you have any questions or need further clarification along the way. Have a wonderful day ahead!

Sign in to comment.

More Answers (0)

Categories

Products

Release

R2022b

Asked:

on 5 Jul 2024

Commented:

on 9 Jul 2024

Community Treasure Hunt

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

Start Hunting!