473,408 Members | 1,762 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Compilation error [sort of OT, qt related]

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.
Jul 23 '05 #1
1 1879
Never mind, got it sorted.

Lionel.

Lionel van den Berg wrote:
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.

Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: tuko | last post by:
Hello kind people. The folliowing code gives me a compilation error, under MSVC 6.0 and intel 8.0 compiler. It compiles fine with g++ 3.3.1 and borland 5.5 Can you tell me please if the code...
4
by: cpptutor2000 | last post by:
I am trying to create a simple linked list. The source code is provided below. I receive the following error message: (Please see after source code). I have marked the lines where the error occurs...
2
by: Steve | last post by:
Hi I'm receiving the following error whenever a new build is placed onto our production server: Timed out waiting for a program to execute. The command being executed was...
0
by: z f | last post by:
i compile and test my vb.net asp.net web app. once in an hour or so i get a compilation error that only when i do IISRESET goes away. nothing related to my code. i compile and test on win XP...
28
by: richardlang | last post by:
Anyone out there ever come across a preprocessor macro that compares an argument value against the predefined __DATE__ macro in order to control conditional compilation based on date. Something...
9
by: subramanian100in | last post by:
Consider the following program: #include <iostream> #include <string> #include <vector> using namespace std; template<class Tclass Vec : public vector<T> {
3
by: krunalb | last post by:
hi, I am facing compilation error for following snippet: Compilation Error: t7.cc:17: error: expected `)' before '*' token <code snippet>
1
by: BSand0764 | last post by:
I'm getting an error that I can't seem to resolve. When I compile the Functor related logic in a test program, the files compile and execute properly (see Listing #1). However, when I...
11
by: markryde | last post by:
Hello, Followed here is a simplified code example of something which I try to implement; in essence , I want to assign a value to a return value of a method is C. I know, of course, that in this...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.