Hi! I was wondering if anyone got MEX to work under 64 bit Windows 7, using Visual C++ Express Edition 9.0?
I followed all instructions on http://www.mathworks.com/support/solutions/en/data/1-6IJJ3L/index.html?solution=1-6IJJ3L exactly, and it had worked for me before on Windows Vista. Now, Matlab using mex -setup can certainly detect the compiler, but when I use it to compile something (such as yprime.c as in the example), I get the error:
LINK : fatal error LNK1104: cannot open file 'yprime.mexw64'
C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: Link of 'yprime.mexw64' failed.
Is this a compiler error or a Matlab one? Could it be that my Visual C++ EE 9.0
or my Microsoft Windows SDK is installed incorrectly? How would I find out? (I've never worked with Visual stuff, I've only used their compiler for Matlab mexing).
|
|
0
|
|
|
|
Reply
|
Julian
|
3/24/2010 4:57:04 AM |
|
"Julian Xue" <jzxue@hotmail.com> wrote in message <hoc630$lm7$1@fred.mathworks.com>...
> Hi! I was wondering if anyone got MEX to work under 64 bit Windows 7, using Visual C++ Express Edition 9.0?
>
> I followed all instructions on http://www.mathworks.com/support/solutions/en/data/1-6IJJ3L/index.html?solution=1-6IJJ3L exactly, and it had worked for me before on Windows Vista. Now, Matlab using mex -setup can certainly detect the compiler, but when I use it to compile something (such as yprime.c as in the example), I get the error:
>
> LINK : fatal error LNK1104: cannot open file 'yprime.mexw64'
>
> C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: Link of 'yprime.mexw64' failed.
>
> Is this a compiler error or a Matlab one? Could it be that my Visual C++ EE 9.0
> or my Microsoft Windows SDK is installed incorrectly? How would I find out? (I've never worked with Visual stuff, I've only used their compiler for Matlab mexing).
Hi.
I'm having similar issue :(
|
|
0
|
|
|
|
Reply
|
Nikolay
|
7/1/2010 6:05:20 AM
|
|
I'm having a similar issue; linker complains when trying to build the rapid simulation target in Simulink. Here's the readout for a simple gain patch:
### Building the rapid accelerator target for model: gain
Setting environment for using Microsoft Visual Studio 2008 Beta2 x64 tools.
WindowsSdkDir not found
Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.
cl -DRSIM_PARAMETER_LOADING /wd4996 -DEXT_MODE /Od /Oy- /DNDEBUG -DMODEL=gain -DHAVESTDIO -DNRT -DRSIM_WITH_SL_SOLVER gain.c
Microsoft (R) C/C++ Optimizing Compiler Version 15.00.30729.01 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
gain.c
Microsoft (R) Incremental Linker Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.
/out:gain.exe
gain.obj
LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.EXE"' : return code '0x2'
Stop.
The make command returned an error of 2
'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command,
operable program or batch file.
### Real-Time Workshop build procedure for model: 'gain' aborted due to an error.
"Julian Xue" <jzxue@hotmail.com> wrote in message <hoc630$lm7$1@fred.mathworks.com>...
> Hi! I was wondering if anyone got MEX to work under 64 bit Windows 7, using Visual C++ Express Edition 9.0?
>
> I followed all instructions on http://www.mathworks.com/support/solutions/en/data/1-6IJJ3L/index.html?solution=1-6IJJ3L exactly, and it had worked for me before on Windows Vista. Now, Matlab using mex -setup can certainly detect the compiler, but when I use it to compile something (such as yprime.c as in the example), I get the error:
>
> LINK : fatal error LNK1104: cannot open file 'yprime.mexw64'
>
> C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: Link of 'yprime.mexw64' failed.
>
> Is this a compiler error or a Matlab one? Could it be that my Visual C++ EE 9.0
> or my Microsoft Windows SDK is installed incorrectly? How would I find out? (I've never worked with Visual stuff, I've only used their compiler for Matlab mexing).
|
|
0
|
|
|
|
Reply
|
Matthew
|
7/4/2010 5:32:03 AM
|
|
"Nikolay S." <kolian1@gmail.com> wrote in message <i0hb70$8eq$1@fred.mathworks.com>...
> "Julian Xue" <jzxue@hotmail.com> wrote in message <hoc630$lm7$1@fred.mathworks.com>...
> > Hi! I was wondering if anyone got MEX to work under 64 bit Windows 7, using Visual C++ Express Edition 9.0?
> >
> > I followed all instructions on http://www.mathworks.com/support/solutions/en/data/1-6IJJ3L/index.html?solution=1-6IJJ3L exactly, and it had worked for me before on Windows Vista. Now, Matlab using mex -setup can certainly detect the compiler, but when I use it to compile something (such as yprime.c as in the example), I get the error:
> >
> > LINK : fatal error LNK1104: cannot open file 'yprime.mexw64'
> >
> > C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: Link of 'yprime.mexw64' failed.
> >
> > Is this a compiler error or a Matlab one? Could it be that my Visual C++ EE 9.0
> > or my Microsoft Windows SDK is installed incorrectly? How would I find out? (I've never worked with Visual stuff, I've only used their compiler for Matlab mexing).
>
I had this problem with my R2010b 64-bit using the VS 10.0 + Windows 7.1 SDK. The compiler doesn't like the location of yprime.c when Matlab has been installed to Program Files -- must be the spacing and the hardcoding of the directory name to "C:\PROGRA~1\" or "C:\PROGRA~2\" or whatever.
Try copying yprime.c to c:\tmp, navigate there in Matlab, and then mex-compile:
mex yprime.c
|
|
0
|
|
|
|
Reply
|
David
|
9/14/2010 9:20:24 PM
|
|
>
> Try copying yprime.c to c:\tmp, navigate there in Matlab, and then mex-compile:
> mex yprime.c
Yes, the compiler does work. And it is true that Matlab will not be able to handle a file name or path with space.
I always do my work under D:\MATLAB or similar due to this reason.
|
|
0
|
|
|
|
Reply
|
Tung
|
1/11/2011 3:37:06 PM
|
|
Thank you very much!
"David" wrote in message <i6oouo$au3$1@fred.mathworks.com>...
> "Nikolay S." <kolian1@gmail.com> wrote in message <i0hb70$8eq$1@fred.mathworks.com>...
> > "Julian Xue" <jzxue@hotmail.com> wrote in message <hoc630$lm7$1@fred.mathworks.com>...
> > > Hi! I was wondering if anyone got MEX to work under 64 bit Windows 7, using Visual C++ Express Edition 9.0?
> > >
> > > I followed all instructions on http://www.mathworks.com/support/solutions/en/data/1-6IJJ3L/index.html?solution=1-6IJJ3L exactly, and it had worked for me before on Windows Vista. Now, Matlab using mex -setup can certainly detect the compiler, but when I use it to compile something (such as yprime.c as in the example), I get the error:
> > >
> > > LINK : fatal error LNK1104: cannot open file 'yprime.mexw64'
> > >
> > > C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: Link of 'yprime.mexw64' failed.
> > >
> > > Is this a compiler error or a Matlab one? Could it be that my Visual C++ EE 9.0
> > > or my Microsoft Windows SDK is installed incorrectly? How would I find out? (I've never worked with Visual stuff, I've only used their compiler for Matlab mexing).
> >
>
> I had this problem with my R2010b 64-bit using the VS 10.0 + Windows 7.1 SDK. The compiler doesn't like the location of yprime.c when Matlab has been installed to Program Files -- must be the spacing and the hardcoding of the directory name to "C:\PROGRA~1\" or "C:\PROGRA~2\" or whatever.
>
> Try copying yprime.c to c:\tmp, navigate there in Matlab, and then mex-compile:
> mex yprime.c
|
|
0
|
|
|
|
Reply
|
mertturanli (1)
|
3/14/2012 11:40:16 AM
|
|
Hi ,
I have the same kind of problem. I followed all instructions on http://www.mathworks.com/support/solutions/en/data/1-6IJJ3L/index.html?solution=1-6IJJ3L , and it try to make it work on Windows 7. I managed to compile yprime.c file but all other files in which "matrix.h" is included I have these errors :
spline_roi.c(79) : error C2143: syntax error : missing ';' before 'type'
spline_roi.c(81) : error C2065: 'failed' : undeclared identifier
spline_roi.c(284) : warning C4267: '=' : conversion from 'size_t' to 'mwSize', possible loss of data
C:\PROGRA~1\MATLAB\R2012A\BIN\MEX.PL: Error: Compile of 'spline_roi.c' failed.
Error using mex (line 206)
Unable to complete successfully.
Someone told me to suppress -ansi option in the mexopts.bat to make it works but i have not found such an option.
Pauline
"Mert " <mertturanli@gmail.com> wrote in message <jjq030$2cl$1@newscl01ah.mathworks.com>...
> Thank you very much!
>
> "David" wrote in message <i6oouo$au3$1@fred.mathworks.com>...
> > "Nikolay S." <kolian1@gmail.com> wrote in message <i0hb70$8eq$1@fred.mathworks.com>...
> > > "Julian Xue" <jzxue@hotmail.com> wrote in message <hoc630$lm7$1@fred.mathworks.com>...
> > > > Hi! I was wondering if anyone got MEX to work under 64 bit Windows 7, using Visual C++ Express Edition 9.0?
> > > >
> > > > I followed all instructions on http://www.mathworks.com/support/solutions/en/data/1-6IJJ3L/index.html?solution=1-6IJJ3L exactly, and it had worked for me before on Windows Vista. Now, Matlab using mex -setup can certainly detect the compiler, but when I use it to compile something (such as yprime.c as in the example), I get the error:
> > > >
> > > > LINK : fatal error LNK1104: cannot open file 'yprime.mexw64'
> > > >
> > > > C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: Link of 'yprime.mexw64' failed.
> > > >
> > > > Is this a compiler error or a Matlab one? Could it be that my Visual C++ EE 9.0
> > > > or my Microsoft Windows SDK is installed incorrectly? How would I find out? (I've never worked with Visual stuff, I've only used their compiler for Matlab mexing).
> > >
> >
> > I had this problem with my R2010b 64-bit using the VS 10.0 + Windows 7.1 SDK. The compiler doesn't like the location of yprime.c when Matlab has been installed to Program Files -- must be the spacing and the hardcoding of the directory name to "C:\PROGRA~1\" or "C:\PROGRA~2\" or whatever.
> >
> > Try copying yprime.c to c:\tmp, navigate there in Matlab, and then mex-compile:
> > mex yprime.c
|
|
0
|
|
|
|
Reply
|
p.ferry (1)
|
5/17/2012 1:37:17 PM
|
|
"Julian Xue" <jzxue@hotmail.com> wrote in message <hoc630$lm7$1@fred.mathworks.com>...
> Hi! I was wondering if anyone got MEX to work under 64 bit Windows 7, using Visual C++ Express Edition 9.0?
>
> I followed all instructions on http://www.mathworks.com/support/solutions/en/data/1-6IJJ3L/index.html?solution=1-6IJJ3L exactly, and it had worked for me before on Windows Vista. Now, Matlab using mex -setup can certainly detect the compiler, but when I use it to compile something (such as yprime.c as in the example), I get the error:
>
> LINK : fatal error LNK1104: cannot open file 'yprime.mexw64'
>
> C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: Link of 'yprime.mexw64' failed.
>
> Is this a compiler error or a Matlab one? Could it be that my Visual C++ EE 9.0
> or my Microsoft Windows SDK is installed incorrectly? How would I find out? (I've never worked with Visual stuff, I've only used their compiler for Matlab mexing).
Really MATLAB team do not care how much time we are wasting just for its mex component?
|
|
0
|
|
|
|
Reply
|
hesam20052000 (1)
|
11/28/2012 8:21:13 PM
|
|
"he " <hesam20052000@yahoo.com> wrote in message
news:k95rnp$g3l$1@newscl01ah.mathworks.com...
> "Julian Xue" <jzxue@hotmail.com> wrote in message
> <hoc630$lm7$1@fred.mathworks.com>...
>> Hi! I was wondering if anyone got MEX to work under 64 bit Windows 7,
>> using Visual C++ Express Edition 9.0?
>>
>> I followed all instructions on
>> http://www.mathworks.com/support/solutions/en/data/1-6IJJ3L/index.html?solution=1-6IJJ3L
>> exactly, and it had worked for me before on Windows Vista. Now, Matlab
>> using mex -setup can certainly detect the compiler, but when I use it to
>> compile something (such as yprime.c as in the example), I get the error:
>>
>> LINK : fatal error LNK1104: cannot open file 'yprime.mexw64'
>> C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: Link of 'yprime.mexw64'
>> failed.
>>
>> Is this a compiler error or a Matlab one? Could it be that my Visual C++
>> EE 9.0
>> or my Microsoft Windows SDK is installed incorrectly? How would I find
>> out? (I've never worked with Visual stuff, I've only used their compiler
>> for Matlab mexing).
>
> Really MATLAB team do not care how much time we are wasting just for its
> mex component?
For a response from the official Technical Support group here at MathWorks,
please contact them using the instructions in my signature. While MathWorks
staff members do read this newsgroup, not all of us are experts in MEX-file
debugging. If you contact Technical Support with this issue, it will be
automatically routed to staff members that specialize in MEX.
--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com
|
|
0
|
|
|
|
Reply
|
slord (13279)
|
11/29/2012 2:21:32 PM
|
|
|
8 Replies
2001 Views
(page loaded in 0.14 seconds)
Similiar Articles: MEX in Matlab 7.10, 64 bit, Windows 7 - comp.soft-sys.matlab ...> > Try copying yprime.c to c:\tmp, navigate there in Matlab, and then mex-compile: > mex yprime.c Yes, the compiler does work. And it is true that Matlab will not be ... Cross-compiler mex files on Windows 7 64 bit - comp.soft-sys ...MEX in Matlab 7.10, 64 bit, Windows 7 - comp.soft-sys.matlab ... Cross-compiler mex files on Windows 7 64 bit - comp.soft-sys ... MEX in Matlab 7.10, 64 bit, Windows 7 ... Default API for mex - 64 bit or 32 bit ?? - comp.soft-sys.matlab ...MEX in Matlab 7.10, 64 bit, Windows 7 - comp.soft-sys.matlab ... Default API for mex - 64 bit or 32 bit ?? - comp.soft-sys.matlab ... Running mex file from MATLAB R2009b ... Running mex file from MATLAB R2009b on 64-bit Windows - comp.soft ...How to use the 32bit mex file in a 64bit matlab - comp.soft-sys ... Running mex file from MATLAB R2009b on 64-bit Windows - comp.soft ... How to use the 32bit mex ... 64bit linux, mex, Fortran, and -largeArrayDims - comp.soft-sys ...MEX in Matlab 7.10, 64 bit, Windows 7 - comp.soft-sys.matlab ... 64bit linux, mex, Fortran, and -largeArrayDims - comp.soft-sys ... mex and intel compiler - comp.soft-sys ... How to use the 32bit mex file in a 64bit matlab - comp.soft-sys ...MEX in Matlab 7.10, 64 bit, Windows 7 - comp.soft-sys.matlab ... How to use the 32bit mex file in a 64bit matlab - comp.soft-sys ... MEX in Matlab 7.10, 64 bit, Windows 7 ... MEX file cannot find entry point in 64-bit linux - comp.soft-sys ...MEX in Matlab 7.10, 64 bit, Windows 7 - comp.soft-sys.matlab ... MEX file cannot find entry point in 64-bit linux - comp.soft-sys ... MEX in Matlab 7.10, 64 bit, Windows 7 ... MEX 32 bit on 64 bit machine - comp.soft-sys.matlabMEX in Matlab 7.10, 64 bit, Windows 7 - comp.soft-sys.matlab ... MEX 32 bit on 64 bit machine - comp.soft-sys.matlab Running MATLAB 32-bit on Windows 7 64-bit - comp.soft ... Running MATLAB 32-bit on Windows 7 64-bit - comp.soft-sys.matlab ...Hello, After upgrading my OS to Windows 7 64-bit and installing MATLAB 64-bit ... MEX in Matlab 7.10, 64 bit, Windows 7 - comp.soft-sys.matlab ... mex on 64 bits mac ... mex on 64 bits mac os 10.6.3 - comp.soft-sys.matlabMEX in Matlab 7.10, 64 bit, Windows 7 - comp.soft-sys.matlab ... mex on 64 bits mac os 10.6.3 - comp.soft-sys.matlab MEX in Matlab 7.10, 64 bit, Windows 7 - comp.soft ... MEX in Matlab 7.10, 64 bit, Windows 7 - comp.soft-sys.matlab ...> > Try copying yprime.c to c:\tmp, navigate there in Matlab, and then mex-compile: > mex yprime.c Yes, the compiler does work. And it is true that Matlab will not be ... MEX in Matlab 7.10, 64 bit, Windows 7 - Newsreader - MATLAB Central> Try copying yprime.c to c:\tmp, navigate there in Matlab, and then mex-compile: > mex yprime.c Yes, the compiler does work. And it is true that Matlab will not be ... 7/21/2012 9:01:14 PM
|