This archive web page is obsolete!

Please refer to the new mailman archive! compile problem with mcstas-1.5


[Date Prev][Date Next] [Chronological] [Thread] [Top]

compile problem with mcstas-1.5



Dear fellow McStas user,

just recently I switched to McStas 1.5 and everything went smooth
until I tried to compile the McStas generated C-code for an .inst
I used before.

 I am getting the following error messages:

wildgrub@pc-e21-18:/mc > cc -o t t.c -lm
/home/wildgrub/lib/mcstas/Flux_adapter.comp: In function `mcinit':
/home/wildgrub/lib/mcstas/Flux_adapter.comp:92: `flad' undeclared (first use in
this function)
/home/wildgrub/lib/mcstas/Flux_adapter.comp:92: (Each undeclared identifier is
reported only once
/home/wildgrub/lib/mcstas/Flux_adapter.comp:92: for each function it appears
in.)

I'll attach t.instr for anybody interested in trying out!

Is this a known problem ?
What am I doing wrong ?

Any comments are greatly appreciated!!!

Regards

Uli

P.S. 't.instr' is only the beginning of a longer file, the result during 
compile time however is identical...

-- 
Ulrich WILDGRUBER
wildgrub@dxray.mpi-stuttgart.mpg.de
wwwmf.mpi-stuttgart.mpg.de/abteilungen/dosch/dosch.html
-----------------------------------------------------------------------------
Max-Planck-Institut für Metallforschung	| Technische Universität München
Heisenbergstr. 1		        | ZBE Neue Forschungs-Neutronenquelle
					| Instrumentierung
D-70569 Stuttgart			| D-85747 Garching/München
Tel.: (+49)-711-689-1900		| Tel.: (+49)-89-289-14681
Fax.: (+49)-711-689-1902		| Fax.: (+49)-89-289-14666
DEFINE INSTRUMENT MatSciR(PHM, TTM, PHD)

/* 						improved version 01/2001        */
/* NL-1: Alle (!) Segmente beruecksichtigt ... 					*/
/*    work in progress...		       					*/
/*										*/
/* Basic configuration of the monochromator with downstream apertures		*/
/*	n-Quelle:      Leiterende NL-1; m = 2, 2.5; 60mm wide, 120mm high      	*/
/*	Monochromator: Mica d(002) = 9.95 A; Q = 2pi/d = 0.6315 rez.A	  	*/
/*		       (a small vertical mosaic spread is more realistic	*/
/*      	or:    HOPG d(002) = 3.355A; Q = 2pi/d = 1.8728 rez.A     	*/
/*                     220mm wide (long), 120mm high - hypothetical             */
/*	Aperture 1:    25mm x 5mm					 	*/
/*		 2:    not yet introduced again					*/
/*										*/
/*	Guide:	       2m, sides only between apertures, m = 1, 2, 3  (later)  	*/
/*	Detector:      after last device				  	*/

DECLARE
%{
double mono_mosaic = 60;	/* Is less more ?  ...probably not */
double mono_vmos   = 60;
/* double mono_q = 0.6315; */
double mono_q = 1.8728;
double mono_r0 = 1.0;
double m1 = 2.0;
double m2 = 2.5;
double alp = 6.49;
double CW = 0.003333;
%}

INITIALIZE
%{
%}

TRACE

COMPONENT a1 = Arm()
  AT (0,0,0) ABSOLUTE

COMPONENT source = Source_flat_lambda(
	radius = 0.15,
	dist = 2.595,
	xw = 0.11, yh = 0.17,
	lambda_0 = 2.0,
	d_lambda = 0.20)
  AT (0,0,0) RELATIVE a1

COMPONENT flad = Flux_adapter(
	xmin = -0.055,
	xmax = 0.055,
	ymin = -0.085,
	ymax = 0.085,
	file = "./source.flux",
	options = " [ lambda p ]")
  AT (0,0,0.001) RELATIVE a1

end