473,224 Members | 1,375 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,224 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 1871
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: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.