Dear Stephan,
MEX files for win64 are provided with SPM8 so you should not need to
recompile them. The particular file you are trying to recompile should
be found in two locations:
spm8/external/forwinv/private/ptriproj.mexw64
and
spm8/external/fieldtrip/private/ptriproj.mexw64
Could it be that you have FieldTrip in your path (the full version, not
the SPM-tailored one) and that it doesn't come with mexw64 files?
In case you really have to compile it again, the command line is:
>> mex -O ptriproj.c geometry.c
Best regards,
Guillaume.
S B wrote:
> Hi,
>
> I am new to spm, sorry in advance if I am asking something that was
> previously discussed.
>
> I have a question regarding forward solutions for EEG/MEG source
> analysis in SPM8.
>
> I run into following error when I want to compute the forward solution
> in the 3D Source Reconstruction.
>
> ??? Error using ==> ptriproj at 29
> could not locate MEX file for ptriproj
>
> Error in ==> project_elec at 31
> [proj, dist] = ptriproj(pnt(tri(j,1),:), pnt(tri(j,2),:),
> pnt(tri(j,3),:), elc(i,:), 1);
> .....
>
> I tried compiling the file using some code I found on the fieldtrip website:
>
> mex -I. -c geometry.c
> mex -I. -c ptriproj.c ; mex ptriproj.c ptriproj.obj geometry.obj
>
> but that gives me this error:
>
> Microsoft (R) Incremental Linker Version 9.00.21022.08
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> C:\DOCUME~1\SB\LOCALS~1\TEMP\MEX_MW~1\ptriproj.obj ptriproj.obj
> geometry.obj
> ptriproj.obj : error LNK2005: mexFunction already defined in ptriproj.obj
> Creating library C:\DOCUME~1\SB\LOCALS~1\TEMP\MEX_MW~1\templib.x and
> object C:\DOCUME~1\SB\LOCALS~1\TEMP\MEX_MW~1\templib.exp
> ptriproj.mexw64 : fatal error LNK1169: one or more multiply defined
> symbols found
>
> C:\PROGRA~1\MATLAB\R2008B\BIN\MEX.PL: Error: Link of 'ptriproj.mexw64'
> failed.
>
> ??? Error using ==> mex at 213
> Unable to complete successfully.
>
>
> I am running Matlab 2008b on windows XP 64bit.
>
> Does anyone know what I am doing wrong?
>
> Thanks a lot in advance!
>
> Stephan
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|