Connecting Tech Pros Worldwide Forums | Help | Site Map

Compilation error [sort of OT, qt related]

Lionel van den Berg
Guest
 
Posts: n/a
#1: Jul 23 '05
Hi all,

I'm having a problem porting from qt2.x to qt3.x. I have posted on a qt
forum but no joy as yet so I thought that maybe someone here could shed
some more light on what the compiler is doing. I have copied and pasted
my other post below.

*****
I'm just trying to compile some older code that used the qt libraries
but had a make file manually written for it and was being used on an
older version of qt (2.2ish). I'm using qt-designer 3.3.3.

The original code compiles on a 32bit solaris machine, I'm trying to
compile on a 64bit (dual Xeons) machine with redhat but I keep getting
errors that just don't look like errors to me.
The following is what I did at the command line and the output:

lionel@quince:~/buildModels$ qmake -o Makefile build_models.pro

lionel@quince:~/buildModels$ make
g++ -c -pipe -Wall -W -O2 -g -pipe -m64 -DQT_NO_DEBUG -DQT_SHARED
-DQT_THREAD_SUPPORT -I/usr/lib64/qt-3.3/mkspecs/default -I.
-I/usr/lib64/qt-3.3/include -I.ui/ -I.moc/ -o .obj/tracksegment.o
tracksegment.cpp
In file included from /usr/include/pthread.h:24,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../../include/c++/3.4.2/x86_64-redhat-linux/bits/gthr-default.h:43,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../../include/c++/3.4.2/x86_64-redhat-linux/bits/gthr.h:104,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../../include/c++/3.4.2/x86_64-redhat-linux/bits/c++io.h:37,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../../include/c++/3.4.2/iosfwd:47,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../../include/c++/3.4.2/bits/stl_algobase.h:70,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../../include/c++/3.4.2/bits/char_traits.h:46,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../../include/c++/3.4.2/string:47,
from /usr/lib64/qt-3.3/include/qstring.h:56,
from tracksegment.h:3,
from tracksegment.cpp:1:
../signal.h:9: error: expected `;' before '*' token
../signal.h:10: error: `TrackSeg' was not declared in this scope
../signal.h:10: error: template argument 1 is invalid
../signal.h:13: error: `QString' has not been declared
../signal.h:16: error: `TrackSeg' was not declared in this scope
../signal.h:16: error: template argument 1 is invalid
../signal.h:16: error: `TrackSeg' was not declared in this scope
../signal.h:16: error: template argument 1 is invalid
In file included from
/usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../../include/c++/3.4.2/backward/iostream.h:31,
from point.h:5,
from pointselect.h:5,
from nextsegment.h:5,
from tracksegment.h:5,
from tracksegment.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../../include/c++/3.4.2/backward/backward_warning.h:32:2:
warning: #warning This file includes at least one deprecated or
antiquated header. Please consider using one of the 32 headers found in
section 17.4.1.2 of the C++ standard. Examples include substituting the
<X> header for the <X.h> header for C++ includes, or <iostream> instead
of the deprecated header <iostream.h>. To disable this warning use
-Wno-deprecated.
make: *** [.obj/tracksegment.o] Error 1

The following is the code from signal.h:

#include <qstring.h>
#include <qptrlist.h>
#include "tracksegment.h"

class Signal {
public:
QString *id;
QPtrList<TrackSeg> *berth, *repl;

//constructors
Signal(QString name);

//Add extra attributes
void AddExtras(QPtrList<TrackSeg> *b,QPtrList<TrackSeg> *r);
};

I'm aware of one library (qlist) that has been deprecated, I haven't
changed all the names (I have in the above file) but I am hoping that
the compiler can eventually direct me rather than finding them all myself.

Can anyone help me?

Thanks,

Lionel.

Lionel van den Berg
Guest
 
Posts: n/a
#2: Jul 23 '05

re: Compilation error [sort of OT, qt related]


Never mind, got it sorted.

Lionel.



Lionel van den Berg wrote:[color=blue]
> Hi all,
>
> I'm having a problem porting from qt2.x to qt3.x. I have posted on a qt
> forum but no joy as yet so I thought that maybe someone here could shed
> some more light on what the compiler is doing. I have copied and pasted
> my other post below.
>
> *****
> I'm just trying to compile some older code that used the qt libraries
> but had a make file manually written for it and was being used on an
> older version of qt (2.2ish). I'm using qt-designer 3.3.3.
>
> The original code compiles on a 32bit solaris machine, I'm trying to
> compile on a 64bit (dual Xeons) machine with redhat but I keep getting
> errors that just don't look like errors to me.
> The following is what I did at the command line and the output:
>
> lionel@quince:~/buildModels$ qmake -o Makefile build_models.pro
>
> lionel@quince:~/buildModels$ make
> g++ -c -pipe -Wall -W -O2 -g -pipe -m64 -DQT_NO_DEBUG -DQT_SHARED
> -DQT_THREAD_SUPPORT -I/usr/lib64/qt-3.3/mkspecs/default -I.
> -I/usr/lib64/qt-3.3/include -I.ui/ -I.moc/ -o .obj/tracksegment.o
> tracksegment.cpp
> In file included from /usr/include/pthread.h:24,
> from
> /usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../../include/c++/3.4.2/x86_64-redhat-linux/bits/gthr-default.h:43,
>
> from
> /usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../../include/c++/3.4.2/x86_64-redhat-linux/bits/gthr.h:104,
>
> from
> /usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../../include/c++/3.4.2/x86_64-redhat-linux/bits/c++io.h:37,
>
> from
> /usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../../include/c++/3.4.2/iosfwd:47,
>
> from
> /usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../../include/c++/3.4.2/bits/stl_algobase.h:70,
>
> from
> /usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../../include/c++/3.4.2/bits/char_traits.h:46,
>
> from
> /usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../../include/c++/3.4.2/string:47,
>
> from /usr/lib64/qt-3.3/include/qstring.h:56,
> from tracksegment.h:3,
> from tracksegment.cpp:1:
> ./signal.h:9: error: expected `;' before '*' token
> ./signal.h:10: error: `TrackSeg' was not declared in this scope
> ./signal.h:10: error: template argument 1 is invalid
> ./signal.h:13: error: `QString' has not been declared
> ./signal.h:16: error: `TrackSeg' was not declared in this scope
> ./signal.h:16: error: template argument 1 is invalid
> ./signal.h:16: error: `TrackSeg' was not declared in this scope
> ./signal.h:16: error: template argument 1 is invalid
> In file included from
> /usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../../include/c++/3.4.2/backward/iostream.h:31,
>
> from point.h:5,
> from pointselect.h:5,
> from nextsegment.h:5,
> from tracksegment.h:5,
> from tracksegment.cpp:1:
> /usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../../include/c++/3.4.2/backward/backward_warning.h:32:2:
> warning: #warning This file includes at least one deprecated or
> antiquated header. Please consider using one of the 32 headers found in
> section 17.4.1.2 of the C++ standard. Examples include substituting the
> <X> header for the <X.h> header for C++ includes, or <iostream> instead
> of the deprecated header <iostream.h>. To disable this warning use
> -Wno-deprecated.
> make: *** [.obj/tracksegment.o] Error 1
>
> The following is the code from signal.h:
>
> #include <qstring.h>
> #include <qptrlist.h>
> #include "tracksegment.h"
>
> class Signal {
> public:
> QString *id;
> QPtrList<TrackSeg> *berth, *repl;
>
> //constructors
> Signal(QString name);
>
> //Add extra attributes
> void AddExtras(QPtrList<TrackSeg> *b,QPtrList<TrackSeg> *r);
> };
>
> I'm aware of one library (qlist) that has been deprecated, I haven't
> changed all the names (I have in the above file) but I am hoping that
> the compiler can eventually direct me rather than finding them all myself.
>
> Can anyone help me?
>
> Thanks,
>
> Lionel.[/color]
Closed Thread