<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body style='font-family: Verdana,Geneva,sans-serif'>
<pre>Hello, when I compile the example instrument templateSANS.instr with
mcstas 2.6 and gcc 4.4.7 I get this issue
PSD_monitor.comp:76: error: redefinition of typedef 'DArray1d'
PSD_monitor.comp:60: note: previous declaration of 'DArray1d' was here
PSD_monitor.comp:77: error: redefinition of typedef 'DArray2d'
PSD_monitor.comp:64: note: previous declaration of 'DArray2d' was here
PSD_monitor.comp:78: error: redefinition of typedef 'DArray3d'
PSD_monitor.comp:68: note: previous declaration of 'DArray3d' was here
This example compiles well with other gcc compiler (version 4.8.3).
I see at the mcstas pre-compiled file templateSANS.c that the next
typedef definitions appear twice, so this is the redefinition error for
compiler gcc 4.4.7.
typedef double* DArray1d;
typedef double** DArray2d;
typedef double*** DArray3d;
I simply commented those typedef definitions at array-lib. c, because
they are already present in the array-lib. h, and it works ok, at least
I have checked the output values from both compilers and the match ok.
Should I check other things to keep this solution to use compiler 4.4.7?
(this compiler is in a cluster and it is difficult to change version)
With best regards,
Santiago </pre>
<div>
<pre>--
Santiago Miguel Gómez
Departamento de Física de Reactores y Radiaciones
Centro Atómico Bariloche
Int.: 5971
"Si queremos un mundo de paz y de justicia hay que poner decididamente la inteligencia al servicio del amor." Antoine de Saint-Exupery</pre>
</div>
</body></html>