Invalid MEX file - Buffer

Guillaume Flandin gflandin at FIL.ION.UCL.AC.UK
Wed Mar 24 16:35:57 CET 2010

Dear Peri,

if you follow the same instructions than there and recompile, it should
get you sorted:
(basically, remove all reference to -lstdc++ in

Best regards,

> Dear list members
> I have only recently started my Phd project. I'm trying to work with
> some on-line MEG data. I have done some research regarding any software
> that could do my job easier. I have decided to use the FieldTrip Buffer
> in order to store the data while I am doing the processing.
> Initially, I thought that it would be good to have everything or at
> least the buffer on the same machine with the acquisition system. The OS
> on the acquisition system machine is a Linux distribution of Red Hat.
> The problem is that the OS version is too old.
> /gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-59)/
> I installed Matlab on top of that /- (R2006a)/- That was the
> newest version that I managed to get it worked. It did not accept 7.4 or
> any other later version of Matlab.
> When I tried to run some of the examples that you provide in order to
> test the operation of the buffer I got errors regarding the MEX file. I
> followed the instruction and tried to compile the .c files. Despite the
> fact that everything went well with the compilation, buffer.mexglx  was
> created, I got again the same error.
> ?/?? Invalid MEX-file
> '/home/peri/fieldtrip-20100314/fileio/private/buffer.mexglx':
> /matlab/bin/glnx86/../../sys/os/glnx86/ version
> `GCC_4.2.0' not found (required by /usr/lib/
> Error in ==> write_data at 189
>        buffer('put_dat', packet, host, port);
> Error in ==> rt_signalproxy at 116
>    write_data(, dat, 'header', hdr, 'dataformat',
>, 'append', false);
> /
> The compatibility has been checked in a Virtual machine in order to keep
> the MEG system clean as I am not the only person who uses it.
> I have checked everything that I could and I even asked help from the
> I.T. support but my problem has not been solved. I would like to ask if
> the error I get, is a compatibility error since the program is looking
> for another gcc version (version `GCC_4.2.0' not found)   .
> Could you please suggest me what can be done in order to overcome such
> problems?
> Thanks in advance
> P. Trigkas

Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG

The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also and

More information about the fieldtrip mailing list