Hi, I've just started to read about Qt, so I bought a book and downloaded a library to be used with the examples. When I try to compile that library I get the error of the class name. I've had a look at the code but didn't see anything wrong.
The error:
make[1]: se ingresa al directorio `/mnt/almacen/dev-libs/utils'
g++ -c -pipe -march=athlon64 -O2 -pipe -march=athlon64 -O2 -Wall -W -D_REENTRANT -fPIC -DLIBRARY_BUILD -D__PWD__=/home/whisp/almacen/dev-libs/utils -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB
-DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I.moc -I.ui -o .obj/exception.o exception.cpp
In file included from exception.cpp:1:
exception.h:8: error: expected class-name before '{' token
make[1]: *** [.obj/exception.o] Error 1
and the code from exception.h until the line of the error (not my code, as I've said before)
#ifndef EXCEPTION_H
#define EXCEPTION_H
#include <qtconcurrentexception.h>
#include <QString>
class Exception : public QtConcurrent::Exception {
// member declarations
}
#ifndef EXCEPTION_H
#define EXCEPTION_H
#include <qtconcurrentexception.h>
#include <QString>
class Exception : public QtConcurrent::Exception {
// member declarations
}
To copy to clipboard, switch view to plain text mode
I know this kind of error would have been caused by a typo in the classname, or if the class hadn't been declared, but it's declared in qtconcurrentexception.h , and in the QtConcurrentNamespace, so... what's wrong??
Bookmarks