Dear Luigi,
how do you compile your application? If you look at the end of
spm_make_standalone.m, you will see the options we use for SPM when
calling mcc: in particular, we use "'-a',spm('Dir')" to make sure that
all SPM functions will be compiled even if they are initially missed by
the dependency analysis.
Best regards,
Guillaume.
On 01/04/15 15:04, Luigi Pavone wrote:
> Hi Guillaume,
>
> thanks for your help, but I think that I'm a little bit confused.
>
> I've compiled spm12, and I've got Contents.txt file (attached).
>
> When I launch my application, I get this error now :
>
> Undefined function or variable 'tbx_cfg_render'.
>
> /Error in spm_cfg_static_tools (line 3)/
> /
> /
> /Error in spm_cfg (line 79)/
> /
> /
> /Error in cfg_mlbatch_appcfg_1 (line 9)/
> /
> /
> /Error in cfg_mlbatch_appcfg_master (line 2)/
> /
> /
> /Error in cfg_util>local_initapps (line 1422)/
> /
> /
> /Error in cfg_util (line 737)/
> /
> /
> /Error in spm_jobman (line 173)/
> /
> /
> /Error in spm_jobman (line 108)/
>
> The error seems to refer to the second file you were talking about.
>
> Do you know how I can fix this error?
>
> Thanks in advance
>
> Best regards
>
> 2015-03-31 20:38 GMT+02:00 Guillaume Flandin <[log in to unmask]
> <mailto:[log in to unmask]>>:
>
> Dear Luigi,
>
> when compiling SPM, there are two extra files that are generated by
> spm_make_standalone.m:
> * Contents.txt, a copy of Contents.m, such that SPM can get access to
> its revision number (this will fix the error you get)
> * config/spm_cfg_static_tools.m: a static listing of all SPM toolboxes
> batch configuration files - this is only necessary if your compiled
> version of SPM makes use of the batch system.
>
> Best regards,
> Guillaume.
>
>
> On 31/03/15 15:34, Luigi Pavone wrote:
> > Hi to everybody,
> >
> > I have a problem:
> >
> > I'm creating a standalone application in MATLAB using MATLAB Compiler
> > Toolbox.
> >
> > This application uses some spm12 functions.
> >
> > When I launch m code in MATLAB I don't have problem and the application
> > works well.
> >
> > When I try to create a standalone application starting from my m code, I
> > got this error :
> >
> > /Error using spm_spm_version (line 1308)/
> > /
> > /
> > /Can't obtain SPM Revision information./
> > /
> > /
> > /Error in spm (line 894)/
> > /
> > /
> > /Error in spm (line 827)/
> >
> > I have spm12 in the matlab path, I've tried also to add spm
> directory to
> > PATH environment variable, but I still have the problem.
> >
> > I also tried to make standalone version of spm and add it to matlab
> > path, but nothing changed.
> >
> > Can someone help me?
> >
> > Thanks in advance
> >
> > Best regards
> >
> > Luigi
>
> --
> Guillaume Flandin, PhD
> Wellcome Trust Centre for Neuroimaging
> University College London
> 12 Queen Square
> London WC1N 3BG
>
>
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|