[CLAM] two problems in GNULinux version

Xavi Rubio xrubio at iua.upf.es
Fri Apr 11 05:36:05 PDT 2003


Hi Vicenç!
The first error is easy to solve. There's a line in UserTutorial4.cxx (I think the number 48) that
declares an:

Array<Complex<TData> > &cplx = spec.GetComplexArray();

It throws and error because in src/Standard/Complex.hxx Complex is declared as a typedef of ComplexTmpl<TData>, so
the <TData> template in UserTutorial4.cxx is unnecessary:

Array<Complex> &cplx = spec.GetComplexArray();

Anyway, it will be corrected in the CVS.

The other error is relative to the linking of fltk. It needs to link against libGL library, too.
So try to add this library to the FLTK_LIBS variable, so it will link against GL.
It could be done in the make.rules file in unix_tools:

FLTK_LIBS     = -lfltk -lGL (line 33, I think).

With this, and doing 'make depend' before compiling UserTutorial4, it should work.
If it still linking without GL (you can see this when it links; it must have a -lGL in some line of the linking),
you can explicitly link against it creating a file .libs with the needed library in unix_tools/modules. Just create a
file WHATBINARYYOUCANCOMPILE.libs (like .files and .modules), and put GL in this (if it's created, just add the name 
of library).
And just make depend.

Xavi

On Fri, 11 Apr 2003 10:04:45 +0200
Vicen <vgomez at iua.upf.es> wrote:

> Hi all again! I hope I'm subscribed to the list. In the CLAM subscribers 
> web appears my name (vicen.gomez at iua.upf.es)  :)
> 
> Only two little questions, for the public version:
> 
> I've tried to compile all the Tutorial examples of the 
> /CLAM/examples/Tutorial directory:
> 
> All work well except the fourth. The compiler found an error in the line 
> accessing to an attribute of an Spectrum object:
> 
>         Array<Complex<TData> > &cplx = spec.GetComplexArray();
> 
> The error is:
> 
> .../UserTutorial4.cxx:48: non-template type `Complex' used as a template
> .../UserTutorial4.cxx:48: ANSI C++ forbids declaration `' with no type
> .../UserTutorial4.cxx:48: conversion from 
> `CLAM::Array<CLAM::ComplexTmpl<double> >' to non-scalar type 
> `CLAM::Array<int>' requested
> .../UserTutorial4.cxx:48: cannot initialize `CLAM::Array<int> &' from 
> `CLAM::Array<CLAM::ComplexTmpl<double> >'
> .../UserTutorial4.cxx:53: request for member `SetReal' in 
> `(+cplx)->CLAM::Array<int>::operator []((&i))', which is of 
> non-aggregate type `int'
> .../UserTutorial4.cxx:54: request for member `SetImag' in 
> `(+cplx)->CLAM::Array<int>::operator []((&i))', which is of 
> non-aggregate type `int'
> make[1]: *** 
> [/home/vicen/clam/CLAM/obj//home/vicen/clam/CLAM/examples/Tutorial/UserTutorial4.o] 
> Error 1
> make[1]: Leaving directory `/home/vicen/clam/CLAM/examples/Tutorial'
> make: *** [UserTutorial4] Error 2
> 
> 
> On the other hand, when I tried to compile some other programs I've this 
> linker error:
> 
> ../../fltk/lib/libfltk.so: undefined reference to `glColor3ub'
> ../../fltk/lib/libfltk.so: undefined reference to `glPixelStorei'
> ../../fltk/lib/libfltk.so: undefined reference to `glDrawPixels'
> ../../fltk/lib/libfltk.so: undefined reference to `glCopyPixels'
> ../../fltk/lib/libfltk.so: undefined reference to `glXUseXFont'
> ../../fltk/lib/libfltk.so: undefined reference to `glFlush'
> ../../fltk/lib/libfltk.so: undefined reference to `glListBase'
> ../../fltk/lib/libfltk.so: undefined reference to `glRasterPos2f'
> ../../fltk/lib/libfltk.so: undefined reference to `glDisable'
> ../../fltk/lib/libfltk.so: undefined reference to `glViewport'
> ../../fltk/lib/libfltk.so: undefined reference to `glBegin'
> ../../fltk/lib/libfltk.so: undefined reference to `glScissor'
> ../../fltk/lib/libfltk.so: undefined reference to `glDrawBuffer'
> ../../fltk/lib/libfltk.so: undefined reference to `glXMakeCurrent'
> ../../fltk/lib/libfltk.so: undefined reference to `glVertex2i'
> ../../fltk/lib/libfltk.so: undefined reference to `glRasterPos2i'
> ../../fltk/lib/libfltk.so: undefined reference to `glXChooseVisual'
> ../../fltk/lib/libfltk.so: undefined reference to `glGenLists'
> ../../fltk/lib/libfltk.so: undefined reference to `glGetIntegerv'
> ../../fltk/lib/libfltk.so: undefined reference to `glCallLists'
> ../../fltk/lib/libfltk.so: undefined reference to `glXDestroyContext'
> ../../fltk/lib/libfltk.so: undefined reference to `glXWaitGL'
> ../../fltk/lib/libfltk.so: undefined reference to `glLoadIdentity'
> ../../fltk/lib/libfltk.so: undefined reference to `glXWaitX'
> ../../fltk/lib/libfltk.so: undefined reference to `glOrtho'
> ../../fltk/lib/libfltk.so: undefined reference to `glEnable'
> ../../fltk/lib/libfltk.so: undefined reference to `glReadBuffer'
> ../../fltk/lib/libfltk.so: undefined reference to `glXSwapBuffers'
> ../../fltk/lib/libfltk.so: undefined reference to `glXCreateContext'
> ../../fltk/lib/libfltk.so: undefined reference to `glEnd'
> 
> I've installed all fltk packages I've seen via apt-get install, before 
> checking out all the things. They are:
> 
> fltk-doc - Documentation for the Fast Light Toolkit
> libfltk1 - The Fast Light Toolkit, a GUI toolkit inspired by libForms
> libfltk1-dbg - The Fast Light Toolkit, and the Fluid user interface designer
> libfltk1-dev - The Fast Light Toolkit, and the Fluid user interface designer
> libfltk1-example - The Fast Light Toolkit, and the Fluid user interface 
> designer
> 
> Maybe I missed some dependence or I've done anything incorrect.... 
> (Note: The AnalisysSynthesis example compiled well, though).
> 
> 
>     Thank you,
> 
>     Vicenç
> 
> 
> _______________________________________________
> CLAM mailing list
> CLAM at iua.upf.es
> http://www.iua.upf.es/mtg/clam
> 




More information about the clam-users mailing list