All'inizio di LogStream.h c'e' un ifdef su _WINDOWS che impedisce al
codice di compilare in linux, gli errori sono questi:
In file included from GLLogStream.cpp:34:
GLLogStream.h:59: error: `QGLWidget' was not declared in this scope
GLLogStream.h:59: error: `qgl' was not declared in this scope
GLLogStream.h:59: error: syntax error before `,' token
GLLogStream.h:57: warning: `class GLLogStream' has virtual functions but
non-virtual destructor
GLLogStream.cpp: In member function `void GLLogStream::Save(int, const char=
*)':
GLLogStream.cpp:50: warning: unused parameter `int Level'
GLLogStream.cpp: At global scope:
GLLogStream.cpp:58: error: `QGLWidget' was not declared in this scope
GLLogStream.cpp:58: error: `qgl' was not declared in this scope
GLLogStream.cpp:58: error: syntax error before `,' token
GLLogStream.cpp: In member function `void GLLogStream::glDraw(...)':
GLLogStream.cpp:66: error: `nlines' undeclared (first use this function)
GLLogStream.cpp:66: error: (Each undeclared identifier is reported only onc=
e
for each function it appears in.)
GLLogStream.cpp:71: error: `qgl' undeclared (first use this function)
ho risolto eliminando i due ifdef _WINDOWS e sostituendo qgl.h con
QGLWidget nell'include, alla fine il file LogStream.h e' (lo incollo
tanto e' piccolo) :
--------- LogStream.h ---------
#ifndef LOGSTREAM_H
#define LOGSTREAM_H
#include <GL/glew.h>
#include <QGLWidget>
class LogStream
{
public:
typedef enum {Error=3D0, Warning=3D1, Info=3D2, Debug=3D3, Direct=3D4,
OnlyFileLog=3D5, OnlyConsole=3D6} Level ;
=09virtual void Log(int Level, const char * f, ... ) =3D 0;
=09virtual void glDraw(QGLWidget *qgl, int Level, int nlines) =3D 0;
};
#endif
-------- fine LogStream.h --------
|