octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need tests for new MEX interface functions run in recent version of


From: Kai Torben Ohlhus
Subject: Re: Need tests for new MEX interface functions run in recent version of Matlab
Date: Wed, 15 Jan 2020 15:54:25 +0900
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0

On 1/15/20 1:09 PM, John W. Eaton wrote:
> On 1/14/20 7:27 PM, Kai Torben Ohlhus wrote:
> 
>>>> mex -r2018a mextst.c
>> Building with 'gcc'.
>> Warning: You are using gcc version '7.5.0'. The version of gcc is not
>> supported. The version currently supported with MEX is '6.3.x'. For a
>> list of currently supported compilers see:
>> https://www.mathworks.com/support/compilers/current_release.
>> MEX completed successfully.
>>
>>>> mextst ([1, 2])
>> mxGetPr:       1.000000, 2.000000
>> mxGetDoubles:  1.000000, 2.000000
>>
>>>> mextst ([1+i, 2+2i])
>> Error using mextst
>> Array must not be complex.
>>
>> %% Commenting out "//pr = mxGetPr" + following line and recompile
>>
>>>> mextst ([1+i, 2+2i])
>>
>> %% MATLAB CRASH!!!!
>>
>> %% Commenting out "//d = mxGetDoubles" + following line and recompile
> 
> Does mxGetDoubles return NULL in this case?  Still, the documentation
> only says it will do that if you built a standalone application, not a
> mex function.
> 
> jwe
> 

Yes, mxGetDoubles returns NULL in this case.  I modified the program, as
attached.

>> mex -r2018a mextst.c
[...]
MEX completed successfully.
>> mextst ([1+i, 2+2i])
Error using mextst
d is 'NULL'

Kai

Attachment: mextst.c
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]