I am trying to use the MATLAB Function block in R2011b. When I try to run my program, this is the error I am getting:
Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks.
Use 'mex -setup' to select a supported C-compiler.
When I try doing mex -setup, I get the following output:
>> mex -setup
Welcome to mex -setup. This utility will help you set up
a default compiler. For a list of supported compilers, see
http://www.mathworks.com/support/compilers/R2011b/win64.html
Please choose your compiler for building MEX-files:
Would you like mex to locate installed compilers [y]/n? n
Select a compiler:
[1] Intel C++ 12.0 (with Microsoft Visual C++ 2008 SP1 linker)
[2] Intel C++ 12.0 (with Microsoft Visual C++ 2010 linker)
[3] Intel C++ 11.1 (with Microsoft Visual C++ 2008 SP1 linker)
[4] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 SP1 linker)
[5] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 Shell linker)
[6] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2010 linker)
[7] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 SP1 linker)
[8] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 Shell linker)
[9] Microsoft Software Development Kit (SDK) 7.1
[10] Microsoft Visual C++ 2005 SP1
[11] Microsoft Visual C++ 2008 SP1
[12] Microsoft Visual C++ 2010
[13] Microsoft Visual C++ 2010 Express
[0] None
Compiler: 1
Warning: The default location for Intel C++ compiler is:
"C:\Program Files (x86)\Intel\ComposerXE-2011"
but either that directory does not exist or the configuration
is invalid.
Use C:\Program Files (x86)\Intel\ComposerXE-2011 anyway [y]/n? y
Please verify your choices:
Compiler: Intel C++ 12.0
Location: C:\Program Files (x86)\Intel\ComposerXE-2011
Are these correct [y]/n? y
Error: Microsoft Visual Studio 2008 SP1 Professional Edition was not found
by mex -setup.
The Microsoft Visual Studio 2008 SP1 Professional Edition linker is
required to build Intel C++ MEX-files. Please make sure that
Microsoft Visual Studio 2008 SP1 Professional Edition is installed
properly.
Error using mex (line 206)
Unable to complete successfully.
Whatever compiler I choose, I get the same error. Which compiler do I need to select, or is there another problem?
By examining your comments, first we have asked you to choose the yes option to see whether or not your computer has any valid compilers installed. You have chosen that and it cannot locate any valid compilers. As such, you don't have any compilers installed on your computer.
Usually if you want to compile MEX files in Windows, you need a Microsoft Visual Studio compiler to allow you to do this. To obtain this, I have four solutions for you depending on what is available to you:
If you are a student in a post-secondary institution, try going to Microsoft DreamSpark: https://www.dreamspark.com/Product/Product.aspx?productid=72&cmpid=W_VS_DSV_DS_728x90_ENG . Your institution may have an agreement with Microsoft, and you'll be able to download Microsoft Visual Studio for free. Seeing as how you are using MATLAB R2011, support up to Visual Studio 2010 is supported. As such, make sure you choose 2010 as the version.
You can try a 90-day trial of Microsoft Visual Studio in case (1) doesn't pan out for you: http://www.visualstudio.com/
You can buy Microsoft Visual Studio in case (1) doesn't pan out for you - use the link in (2)
Use Microsoft Visual Studio Express (this is FREE) - http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs#DownloadFamilies_4 . Make sure you choose Visual C++ 2010 Express. This is essentially a trimmed down version of Microsoft Visual Studio. I am not sure what is available in this distribution, but most of the functionality that is seen with the full version of Microsoft Visual Studio is present. I do know that this is fully compatible with MATLAB R2011, so you shouldn't have a problem getting it running. My suspicion is that you will probably use this approach, and that's totally fine. You also need to download the Windows SDK as well: http://www.microsoft.com/en-us/download/details.aspx?id=8279
Good luck!
Related
I have used the zip archive of binaries of an old Windows version of PostgreSQL that required Microsoft Visual C++ 2010 Redistributable Package (vcredist 2010) to be installed.
I would like to know if the Windows binaries of the newer version of PostgreSQL still need the vcredist 2010. I didn't find anything about this in the download pages of the binaries (https://www.postgresql.org/download/windows/
and https://www.enterprisedb.com/download-postgresql-binaries).
Note: I prefer to use the binaries instead of the standard installer to include PostgreSQL as part of my application installer.
I've installed easyphp-devserver on windows 10. When I launch easyphp, the message "msvcr110.dll is missing" appears.
I've searched on internet and found out I must install the Redistribuable Visual C++ for Visual Studio 2015 [https://www.microsoft.com/en-us/download/details.aspx?id=48145][1]
After that, I installed Visual C++ and reboot my computer.
But that doesn"t work. There is the same error message.
Have you any idea to solve the problem ?
I assume you're referring to the Windows 7/8/10 VC14 version with PHP 7 support (v16.1.1 at the time of this post).
The EasyPHP Devserver download page states that Visual C++ Redistributable for Visual Studio 2015 x86 or x64 is required, which should come installed on Windows 10 already.
What it doesn't mention is that apparently Visual C++ Redistributable for Visual Studio 2012 is also required, and doesn't come installed on Windows 10. Here's the download link for that one:
https://www.microsoft.com/en-us/download/details.aspx?id=30679
Installing the x86 executable got it working for me. No need for the x64 one it seems.
As highlighted by Adam C try downloading the 32bit (e.g. x86) version of Visual C++ Redistributable for Visual Studio 2012 it should resolve the issue... as I had the 64bit Win7 installed I tried to use the 64bit Redistributable file and it did not help fix the issue... but, used the 32bit version and vola it worked.
I have developed an application with Visual Studio 2012. I have also created a setup.exe with Install Shield 2010 Premium for my application. My development environment is Windows 8 64-bit, the application is compiled under Release Win32. The developing language is C++.
After building setup.exe, I ran it on another computer that is running on Windows 7 64-bit. An error message box pops up saying MSVCP110.dll is missing or not configured to run on Windows. Any ideas as to why this may be?
I tried installing Visual C++ Redistributable for Visual Studio 2012 (http://www.microsoft.com/en-au/download/details.aspx?id=30679), but it still gives the same error.
Any help would be appreciated.
MSVCP110.dll is really part of VC++ Redistributable package.
Try to install both versions of them: x86 and x64 if your machine is 64 bit.
For 32bit machine you need only x86 package.
I'm trying to compile a mex file to use socket connection within matlab. The problem is that it is always saying that I don't have sdk or compiler installed. But I have installed visual studio 2010 express, visual studio 2012 express, visual studio 2012 professional and nothing is changing the error. Also I have installed the sdk. Is there anything that I could try? The matlab version is R2012b and I'm using windows 7, 64 bits.
Thanks!
You can try gnumex, which lets you access the mingw compilers on Windows. It works with mingw-w64 which is the 64 bit version of mingw. You have to install the mingw compiler suite, then run gnumex in Matlab to tell it where mingw is and set it up.
I believe that Visual Studio 2012 is only supported on the latest R2013a. Use VS2010 for your MATLAB version.
In addition, the Express editions of VS do not contain 64-bit compilers. You need to either get the Professional edition, or download the free Windows SDK.
See the list of supported compilers for more information
You are asking how to compile the mex-file directly on the Matlab's command line.
An alternative would be to compile the mex-file from Visual Studio. You might be interested in my answer to
No C++ compiler found in MATLAB using mex
Have you run mex -setup to tell MATLAB which compiler you want to use?
See this page on Building MEX-Files for more information
May be this link wil be useful for you
http://support.brainvoyager.com/available-tools/52-matlab-tools-bvxqtools/339-how-to-get-a-64-bit-compiler-under-windows-to-use-with-matlab.html
When I installed Microsoft Visual C++ and C# 2008 Express, I got "Microsoft Windows SDK for Windows Server 2008" added in.
I want to know if I can remove it and still have all the functionality of Visual C++/C#.
Strange, I remember it was shipped with Vista RTM headers (The Microsoft Windows Software Development Kit Update for Windows Vista version). Looks like Microsoft updated the SDK bundled with Express.
Anyway, the SDK is responsible for a lot of features in Visual Studio. For example, Visual Studio invokes sgen.exe to generate XML serializer assemblies, and call rc.exe to compile a resource script. Chances are you can't get away without it if you are not writing hello-world apps.