1 // =============================================================================
2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2006-2008 - INRIA - Serge STEER <serge.steer@inria.fr>
5 // This file is distributed under the same license as the Scilab package.
6 // =============================================================================
7 // <-- Non-regression test for bug 614 -->
9 // <-- Bugzilla URL -->
10 // http://bugzilla.scilab.org/show_bug.cgi?id=614
12 // <-- Short Description -->
13 // mxGetDimensions() from mex.h and mexlib.c do not work
14 // properly. The reason is that it returns a pointer to int
15 // like Matlab, but in fact, the dimensions in scilab are in
18 // Also occur in other OS's.
19 my_current_directory = pwd();
22 TMP_directory = pwd();
23 mputl('ilib_mex_build(''libmex'',[''mexf16'',''mexfunction16'',''cmex''],[''mexfunction16.c''],[],''Makelib'','''','''','''')','builder.sce');
26 'void mexFunction(nlhs, plhs, nrhs, prhs)'
28 ' mxArray *plhs[]; mxArray *prhs[];'
30 ' int *dims = mxGetDimensions(prhs[0]);'
31 ' sciprint(""%d %d %d\n"",dims[0],dims[1],dims[2]);'
34 Generate a gateway file
35 Generate a loader file
36 Generate a Makefile: Makelib
38 Building shared library (be patient)
39 Shared archive loaded.