[Insight-users] FLTK Compiling error
Luis Ibanez
luis.ibanez@kitware.com
Wed, 05 Feb 2003 11:31:41 -0500
Hi Yuanshui,
This is quite strange....
Here are lines 71 to 77 of Fl/Fl_Valuator.H
in FLTK version 1.1.2
----------------------------------------
71 double value() const {return value_;}
72 int value(double);
74 virtual int format(char*);
75 double round(double); // round to nearest multiple of step
76 double clamp(double); // keep in range
77 double increment(double, int); // add n*step to value
------------------------------------------------------
Please verify that they are the same in your installation.
There is nothing really special about these lines.
The error seems to be comming from line 74 and
actually make me think that your compiler does not like
the "virtual." keyword there. However there is another
"virtual" in line 54, and doesn't produce any complaints.
There should be something in your code that is
confusing the compiler.
Could you please post your code in viewer.cpp,
viewer.h, ratLessionUI.h. Something defined before
this #include should be the cause of the problem.
Thanks
Luis
-----------------------------------------------------
Yuanshui wrote:
>Hi Luis,
>
>Thank you for your suggestion. I removed the old FLTK1.0.11 and installed
>fltk1.1.2. The installation was successful except that there were some
>warning messages like:
>
>"/usr/openwin/include/X11/Xutil.h:56: Warning: ignoring pragma."
>
>Also, the demo program provided by FLTK runs OK. However, I still got the
>same error message:
>
>yzheng@Selenium(100) NLM/testtool> make
>g++ -DHAVE_CONFIG_H -g -c -I/usr/local/include -I/usr/local/include/dcmimgle
> -I/usr/local/include/ofstd -I/usr/local/include/dcmdata viewer.cpp
>In file included from /usr/local/include/FL/Fl_Slider.H:30,
> from rateLesionUI.h:10,
> from viewer.h:3,
> from viewer.cpp:38:
>/usr/local/include/FL/Fl_Valuator.H:75: parse error before `int'
>make: *** [viewer.o] Error 1
>
>Any idea? I would really appreciate your help.
>
>Yuanshui
>
>
>
>-----Original Message-----
>From: Luis Ibanez [mailto:luis.ibanez@kitware.com]
>Sent: Monday, February 03, 2003 11:23 AM
>To: Yuanshui
>Cc: Stephen R. Aylward; insight-users@public.kitware.com
>Subject: Re: [Insight-users] FLTK Compiling error
>
>
>
>Hi Yuanshui
>
>It looks like FLTK is not correctly build
>in your system.
>
>FLTK is a fairly compact package. I would
>suggest you to wipe out the directory and
>rebuild FLTK from scratch. This will take
>you about 15 minutes...
>
>Make sure that you use the same compiler
>you want to use for building ITK.
>
>
>Regards,
>
>
> Luis
>
>
>-------------------------------------------
>
>Yuanshui wrote:
>
>
>>Luis,
>>
>>It is a Sun Solaris 2.8 Operation System on a SUN workstation. I am not
>>
>>
>sure
>
>
>>whether the FLTK was built correctly, as it was built by my former
>>colleague. However, it worked when I only used other classes (not
>>
>>
>Fl_Slider,
>
>
>>which inherits from Fl_Valuator). Please let me know if you need any
>>
>>
>further
>
>
>>information. Thank you,
>>
>>Yuanshui
>>
>>
>>
>
>
>
>
>
>