Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How to use MATLAB R2007b with Microsoft Visual Studio 2008?

Subject: How to use MATLAB R2007b with Microsoft Visual Studio 2008?

From: Idil Selin

Date: 29 Nov, 2010 13:53:02

Message: 1 of 8

Hi, I am using Matlab R2007b on Windows Vista, 32 bit. I need to change the default MATLAB compiler. I do run:
>> mex –setup
..and this is the screen:
Please choose your compiler for building external interface (MEX) files:
Would you like mex to locate installed compilers [y]/n? n
Select a compiler:
[1] Borland C++ Compiler (free command line tools) 5.5
[2] Borland C++Builder 6.0
[3] Borland C++Builder 5.0
[4] Compaq Visual Fortran 6.1
[5] Compaq Visual Fortran 6.6
[6] Intel C++ 9.1 (with Microsoft Visual C++ 2005 linker)
[7] Intel Visual Fortran 9.1 (with Microsoft Visual C++ 2005 linker)
[8] Intel Visual Fortran 9.0 (with Microsoft Visual C++ 2005 linker)
[9] Intel Visual Fortran 9.0 (with Microsoft Visual C++ .NET 2003 linker)
[10] Lcc-win32 C 2.4.1
[11] Microsoft Visual C++ 6.0
[12] Microsoft Visual C++ .NET 2003
[13] Microsoft Visual C++ 2005
[14] Microsoft Visual C++ 2005 Express Edition
[15] Open WATCOM C++ 1.3

[0] None
Compiler: 11 (I do need a Microsoft Visual Compiler)
 
The default location for Microsoft Visual C++ compilers is C:\Program Files\Microsoft Visual Studio,
but that directory does not exist on this machine.
Use C:\Program Files\Microsoft Visual Studio anyway [y]/n?

If I say yes, it will Not find the compiler and fail later.

Looking at the C:\Program Files directory I do have:
Microsoft Visual Studio/Common/IDE/Ide98/ASP.TLB: it is quite an empty directory
Before I did install also:
Microsoft Visual 8 where I have: COMMON7 (with IDE and Packages), SDK (empty), and VSTA (with bin)
Microsoft Visual Studio .NET 2003 with COMMON7/IDE which is empty!!!
Microsoft Visual Studio 9.0 full of subdirectories (the only one because I got it from a DVD instead of downloading it from Internet).

Please, do help me. I am really confused.
What do I need?
Why MATLAB does NOT see the Microsoft Visual Studio directory? Why does it says that it does NOT exist? It is present, ...but ½ empty.
I can just use “Lcc-win32”, the default compiler. Why?
Thank you, Idil

Subject: How to use MATLAB R2007b with Microsoft Visual Studio 2008?

From: Aurelien Queffurust

Date: 29 Nov, 2010 14:30:09

Message: 2 of 8

"Idil Selin" <idilselin@yahoo.it> wrote in message <id0b7u$j1s$1@fred.mathworks.com>...
> Hi, I am using Matlab R2007b on Windows Vista, 32 bit. I need to change the default MATLAB compiler. I do run:
> >> mex –setup
> ..and this is the screen:
> Please choose your compiler for building external interface (MEX) files:
> Would you like mex to locate installed compilers [y]/n? n
> Select a compiler:
> [1] Borland C++ Compiler (free command line tools) 5.5
> [2] Borland C++Builder 6.0
> [3] Borland C++Builder 5.0
> [4] Compaq Visual Fortran 6.1
> [5] Compaq Visual Fortran 6.6
> [6] Intel C++ 9.1 (with Microsoft Visual C++ 2005 linker)
> [7] Intel Visual Fortran 9.1 (with Microsoft Visual C++ 2005 linker)
> [8] Intel Visual Fortran 9.0 (with Microsoft Visual C++ 2005 linker)
> [9] Intel Visual Fortran 9.0 (with Microsoft Visual C++ .NET 2003 linker)
> [10] Lcc-win32 C 2.4.1
> [11] Microsoft Visual C++ 6.0
> [12] Microsoft Visual C++ .NET 2003
> [13] Microsoft Visual C++ 2005
> [14] Microsoft Visual C++ 2005 Express Edition
> [15] Open WATCOM C++ 1.3
>
> [0] None
> Compiler: 11 (I do need a Microsoft Visual Compiler)
>
> The default location for Microsoft Visual C++ compilers is C:\Program Files\Microsoft Visual Studio,
> but that directory does not exist on this machine.
> Use C:\Program Files\Microsoft Visual Studio anyway [y]/n?
>
> If I say yes, it will Not find the compiler and fail later.
>
> Looking at the C:\Program Files directory I do have:
> Microsoft Visual Studio/Common/IDE/Ide98/ASP.TLB: it is quite an empty directory
> Before I did install also:
> Microsoft Visual 8 where I have: COMMON7 (with IDE and Packages), SDK (empty), and VSTA (with bin)
> Microsoft Visual Studio .NET 2003 with COMMON7/IDE which is empty!!!
> Microsoft Visual Studio 9.0 full of subdirectories (the only one because I got it from a DVD instead of downloading it from Internet).
>
> Please, do help me. I am really confused.
> What do I need?
> Why MATLAB does NOT see the Microsoft Visual Studio directory? Why does it says that it does NOT exist? It is present, ...but ½ empty.
> I can just use “Lcc-win32”, the default compiler. Why?
> Thank you, Idil


Hi Idil ,

You should follow this technical note which explains what you observe:
Why am I unable to select my Microsoft Visual Studio Visual C++ compiler in MATLAB?
http://www.mathworks.com/support/solutions/en/data/1-2VO2CO/?solution=1-2VO2CO

Aurélien
http://blog.developpez.com/matlab4geek/

Subject: How to use MATLAB R2007b with Microsoft Visual Studio 2008?

From: Steven_Lord

Date: 29 Nov, 2010 14:51:05

Message: 3 of 8



"Idil Selin" <idilselin@yahoo.it> wrote in message
news:id0b7u$j1s$1@fred.mathworks.com...
> Hi, I am using Matlab R2007b on Windows Vista, 32 bit. I need to change
> the default MATLAB compiler. I do run:
>>> mex –setup
> ..and this is the screen:

*snip*

That list looks consistent with the list of supported compilers on the
website:

http://www.mathworks.com/support/compilers/release2007b/

It looks like support for Microsoft Visual Studio 2008 was introduced with
release R2008a:

http://www.mathworks.com/support/compilers/release2008a/

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: How to use MATLAB R2007b with Microsoft Visual Studio 2008?

From: Idil Selin

Date: 30 Nov, 2010 08:10:05

Message: 4 of 8

Hi Steve, thank you very much for your answer.
Ok: I cannot use Microsoft Visual Studio 2008, but then I would like to use any of the other Microsoft Visual C compilers (10-14) present in the list.
The reason for that is because I am trying to use the MATLAB version of the Viola-Jones face detector. It does NOT work with the default compiler, lcc. It is suppose to work with a Microsoft Visual compiler.
I cannot use neither the others? MATLAB does NOT find them? WHY? Are them present in my laptop. I did the downloads. What is missing?
Thank you, Idil

"Steven_Lord" <slord@mathworks.com> wrote in message <id0ekp$6pb$1@fred.mathworks.com>...
>
>
> "Idil Selin" <idilselin@yahoo.it> wrote in message
> news:id0b7u$j1s$1@fred.mathworks.com...
> > Hi, I am using Matlab R2007b on Windows Vista, 32 bit. I need to change
> > the default MATLAB compiler. I do run:
> >>> mex –setup
> > ..and this is the screen:
>
> *snip*
>
> That list looks consistent with the list of supported compilers on the
> website:
>
> http://www.mathworks.com/support/compilers/release2007b/
>
> It looks like support for Microsoft Visual Studio 2008 was introduced with
> release R2008a:
>
> http://www.mathworks.com/support/compilers/release2008a/
>
> --
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com

Subject: How to use MATLAB R2007b with Microsoft Visual Studio 2008?

From: Idil Selin

Date: 30 Nov, 2010 09:22:05

Message: 5 of 8

Thank you Aurelien,
I did follow the link, and it looks like you got the point. Unfortunately, I could not solve the problem, yet.

I am typing:
"getenv VS80COMNTOOLS" and "getenv VS71COMNTOOLS" but in both cases I do get as an answer an empty string, ' '. I guess that this means that I do not have those environment variables.

Steve told me that Microsoft Visual Studio 2008 is NOT supported with R2007b version of MATLAB. OK, then I would like to use any of the others Microsoft Visual Compilers (from [11] to [14] in my list).
My first question is: Are they present in my laptop or not?

Still looking at the page that you pointed to me, I checked the directories:
Microsoft Visual Studio/Common/IDE/ide98/ASP.TLB (nothing else exept this path)
Microsoft Visual Studio .NET 2003/Common7/IDE/ (the last subdirectory, IDE, is empty)
MVS 8 has 3 subdirectories (Common7, SDK, VSTA), but inside Common7 there is (only) IDE and Packages. I do NOT have Tools subdirectory.
MVS 9.0 is full of sub-directories (Application, Common7, ...VC, ...). Yes, inside Common7 I do have Tools, which stores 4 directories (1033, Deployment, Templates, VDT) and a lot of variables... There is also a batch file, vsvars32. Can it be the environment variable? In any case, if it is for MVS 2008, I cannot use it.

Finally, I followed also the last set of instructions:
1. When prompted: "Would you like mex to locate installed compilers [y]/n?" type "n".

2. I select Microsoft Visual C++ .NET 2003

3. You machine has a MV C++ .NET 2003 compiler located at
Location: C:\Program Files\Microsoft Visual Studio .NET 2003
Are these correct? IT LOOKS OK!!!! I TYPE "Y"
... but then it gives me the Warning: MEX requires that the Microsoft Visual C++ 7.1 directories "Vc7" and "Common7" be located within the same parent directories. (Expected to find these directories in "C\Program Files\Microsoft Visual Studio .NET 2003").

Mex is correct, I do not have there "Vc7" and neither "Common7". What can I do? Where can I get them from? I do not think that I can move the 2 directories from MVS 9.0, because those are probably forMicrosoft Visual C++ 8 (which I cannot use with MATLAB R2007b).
Can you guess if I have the chance to use any Visual Basic compilers? Are there present in my laptop? If not what can I do? It looks to me that the free of charge down load from Microsoft is incomplete... Am I wrong?
Thank you, Idil


"Aurelien Queffurust" <tug83@yahoo.fr> wrote in message <id0ddh$e8m$1@fred.mathworks.com>...
> "Idil Selin" <idilselin@yahoo.it> wrote in message <id0b7u$j1s$1@fred.mathworks.com>...
> > Hi, I am using Matlab R2007b on Windows Vista, 32 bit. I need to change the default MATLAB compiler. I do run:
> > >> mex –setup
> > ..and this is the screen:
> > Please choose your compiler for building external interface (MEX) files:
> > Would you like mex to locate installed compilers [y]/n? n
> > Select a compiler:
> > [1] Borland C++ Compiler (free command line tools) 5.5
> > [2] Borland C++Builder 6.0
> > [3] Borland C++Builder 5.0
> > [4] Compaq Visual Fortran 6.1
> > [5] Compaq Visual Fortran 6.6
> > [6] Intel C++ 9.1 (with Microsoft Visual C++ 2005 linker)
> > [7] Intel Visual Fortran 9.1 (with Microsoft Visual C++ 2005 linker)
> > [8] Intel Visual Fortran 9.0 (with Microsoft Visual C++ 2005 linker)
> > [9] Intel Visual Fortran 9.0 (with Microsoft Visual C++ .NET 2003 linker)
> > [10] Lcc-win32 C 2.4.1
> > [11] Microsoft Visual C++ 6.0
> > [12] Microsoft Visual C++ .NET 2003
> > [13] Microsoft Visual C++ 2005
> > [14] Microsoft Visual C++ 2005 Express Edition
> > [15] Open WATCOM C++ 1.3
> >
> > [0] None
> > Compiler: 11 (I do need a Microsoft Visual Compiler)
> >
> > The default location for Microsoft Visual C++ compilers is C:\Program Files\Microsoft Visual Studio,
> > but that directory does not exist on this machine.
> > Use C:\Program Files\Microsoft Visual Studio anyway [y]/n?
> >
> > If I say yes, it will Not find the compiler and fail later.
> >
> > Looking at the C:\Program Files directory I do have:
> > Microsoft Visual Studio/Common/IDE/Ide98/ASP.TLB: it is quite an empty directory
> > Before I did install also:
> > Microsoft Visual 8 where I have: COMMON7 (with IDE and Packages), SDK (empty), and VSTA (with bin)
> > Microsoft Visual Studio .NET 2003 with COMMON7/IDE which is empty!!!
> > Microsoft Visual Studio 9.0 full of subdirectories (the only one because I got it from a DVD instead of downloading it from Internet).
> >
> > Please, do help me. I am really confused.
> > What do I need?
> > Why MATLAB does NOT see the Microsoft Visual Studio directory? Why does it says that it does NOT exist? It is present, ...but ½ empty.
> > I can just use “Lcc-win32”, the default compiler. Why?
> > Thank you, Idil
>
>
> Hi Idil ,
>
> You should follow this technical note which explains what you observe:
> Why am I unable to select my Microsoft Visual Studio Visual C++ compiler in MATLAB?
> http://www.mathworks.com/support/solutions/en/data/1-2VO2CO/?solution=1-2VO2CO
>
> Aurélien
> http://blog.developpez.com/matlab4geek/

Subject: How to use MATLAB R2007b with Microsoft Visual Studio 2008?

From: Aurelien Queffurust

Date: 30 Nov, 2010 11:03:04

Message: 6 of 8

"Idil Selin" <idilselin@yahoo.it> wrote in message <id2fnt$iv$1@fred.mathworks.com>...
> Thank you Aurelien,
> I did follow the link, and it looks like you got the point. Unfortunately, I could not solve the problem, yet.
>
> I am typing:
> "getenv VS80COMNTOOLS" and "getenv VS71COMNTOOLS" but in both cases I do get as an answer an empty string, ' '. I guess that this means that I do not have those environment variables.
>




The note http://www.mathworks.com/support/solutions/en/data/1-2VO2CO/?solution=1-2VO2CO says:
"If the environment variable for the appropriate compiler does not exist, you will need to either re-install Microsoft Visual Studio or create the environment variable manually"




> Finally, I followed also the last set of instructions:
> 1. When prompted: "Would you like mex to locate installed compilers [y]/n?" type "n".
>
> 2. I select Microsoft Visual C++ .NET 2003
>




From the link
http://www.mathworks.com/support/compilers/release2007b/
you can see there is a note which says :
"These compilers are not supported on Windows Vista." .... and you are under vista.

Aurélien
http://blog.developpez.com/matlab4geek/

Subject: How to use MATLAB R2007b with Microsoft Visual Studio 2008?

From: Idil Selin

Date: 30 Nov, 2010 11:54:06

Message: 7 of 8

Nice!!!
Then my question becomes: How can I set up the environment variable manually? Where shall I put it? Hıow shall I call it...

I guess, I hope that I can use Microsoft Visual C++ 2005 (hoping that it is 8.0 Express Edition), either number ·[13] or number [14] in my list. I tried my chance with both of them but I get a warning and/or error. Not working.

I do really think that it shouldn't be so difficult to change the set-up of a compiler! Considering all money that we pay for MATLAB, don't you think the Microsoft could make the effort to release user friendly software!!!!
Thanks God there are people like you.
Cheers, Idil

"Aurelien Queffurust" <tug83@yahoo.fr> wrote in message <id2ll8$e2a$1@fred.mathworks.com>...
> "Idil Selin" <idilselin@yahoo.it> wrote in message <id2fnt$iv$1@fred.mathworks.com>...
> > Thank you Aurelien,
> > I did follow the link, and it looks like you got the point. Unfortunately, I could not solve the problem, yet.
> >
> > I am typing:
> > "getenv VS80COMNTOOLS" and "getenv VS71COMNTOOLS" but in both cases I do get as an answer an empty string, ' '. I guess that this means that I do not have those environment variables.
> >
>
>
>
>
> The note http://www.mathworks.com/support/solutions/en/data/1-2VO2CO/?solution=1-2VO2CO says:
> "If the environment variable for the appropriate compiler does not exist, you will need to either re-install Microsoft Visual Studio or create the environment variable manually"
>
>
>
>
> > Finally, I followed also the last set of instructions:
> > 1. When prompted: "Would you like mex to locate installed compilers [y]/n?" type "n".
> >
> > 2. I select Microsoft Visual C++ .NET 2003
> >
>
>
>
>
> From the link
> http://www.mathworks.com/support/compilers/release2007b/
> you can see there is a note which says :
> "These compilers are not supported on Windows Vista." .... and you are under vista.
>
> Aurélien
> http://blog.developpez.com/matlab4geek/

Subject: How to use MATLAB R2007b with Microsoft Visual Studio 2008?

From: Aurelien Queffurust

Date: 30 Nov, 2010 12:22:05

Message: 8 of 8

"Idil Selin" <idilselin@yahoo.it> wrote in message <id2oku$o7g$1@fred.mathworks.com>...
> Nice!!!
> Then my question becomes: How can I set up the environment variable manually? Where shall I put it? Hıow shall I call it...
>


In MATLAB doc , you have a step-by-step procedure to set an environment variable in a Windows system:
http://www.mathworks.com/help/techdoc/matlab_external/f39903.html#f40528

Good luck ...

Aurélien
 http://blog.developpez.com/matlab4geek/

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us