LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-08-2004, 01:45 PM   #1
gattumarrudu
LQ Newbie
 
Registered: Mar 2004
Location: Sardinia (Italy)
Distribution: Gentoo / SuSE
Posts: 15

Rep: Reputation: 0
Compiling qCad 2.0.4 - qcadlib stops


I'm compiling qCad 2.0.4.0-1 from the source, as the latest rpm versions provided by its developers have become commercial (not so expensive, actually...)
So, as I'm quite a newbie in compiling, I installed qt3 and qt3-devel (3.2.1-68), set up my environment variables, and ran the script which should do all the job (after modifying the lines that link to the qt directory). The script stops at this point:

[...]

make[2]: Entering directory `/usr/local/src/qcad-2.0.4.0-1.src/qcadlib/src'
g++ -c -pipe -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -fPIC -Wall -W -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -fPIC -DRS_NO_COMPLEX_ENTITIES -DQT_NO_DEBUG -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_THREAD_SUPPORT -I/opt/qt/mkspecs/linux-g++ -I. -I../include -I../../dxflib/include -I../../fparser/include -I../../qcadcmd/include -I../../../../../include -I/usr/lib/qt/include -Imoc/ -o obj/rs_filterdxf.o filters/rs_filterdxf.cpp
filters/rs_filterdxf.cpp: In member function `virtual void RS_FilterDXF::addMText(const DL_MTextData&)':
filters/rs_filterdxf.cpp:512: error: no match for 'operator+=' in 'this->RS_FilterDXF::mtext += data->DL_MTextData::text'
/usr/lib/qt/include/qstring.h:622: error: candidates are: QString& QString::operator+=(const QString&)
/usr/lib/qt/include/qstring.h:935: error: QString& QString::operator+=(const QByteArray&)
/usr/lib/qt/include/qstring.h:629: error: QString& QString::operator+=(const char*)
/usr/lib/qt/include/qstring.h:634: error: QString& QString::operator+=(QChar)
/usr/lib/qt/include/qstring.h:635: error: QString& QString::operator+=(char)
make[2]: *** [obj/rs_filterdxf.o] Error 1
make[2]: Leaving directory `/usr/local/src/qcad-2.0.4.0-1.src/qcadlib/src'
make[1]: *** [lib/libqcad.a] Error 2
make[1]: Leaving directory `/usr/local/src/qcad-2.0.4.0-1.src/qcadlib'
make: *** [all] Error 2
Building qcadlib failed



I entered the src/filters/directory and tried to compile the file manually (with the same options, as I don't know how to set them) and I get the same error.

It doesn't seem to give any error during the configure phase.
Is it a Qt problem? I also tried to download the latest patch, but nothing changed.

Has anybody solved this problem? Any help is greatly appreciated.

gm
 
Old 11-08-2004, 02:14 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Without a change in the sources or Qt version it won't work. First please browse the documentation. Is there any version of Qt specified as required? If not, a code change is probably needed in your case. I understand you have no programming skills to fix it yourself? If the solution is not to use another Qt version, I'll download the source and make the change (but that's 5MB and it'll take me some time).
 
Old 11-09-2004, 10:22 AM   #3
gattumarrudu
LQ Newbie
 
Registered: Mar 2004
Location: Sardinia (Italy)
Distribution: Gentoo / SuSE
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks for your help Mara,
I have been trying for a while; it was actually a question of updating Qt, as qCad needs at least Qt 3.3. So I downloaded the most recent rpms I could get for my distro (qt3-3.3.3-25 and its devel) and the compiling went on..........................
until it stopped here:

[...]
make[2]: Entering directory `/usr/local/src/qcad-2.0.4.0-1.src/qcadguiqt/src'
g++ -c -pipe -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -W -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -DQT_NO_DEBUG -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_THREAD_SUPPORT -I/usr/lib/qt3/mkspecs/linux-g++ -I. -I../include -I../../qcadlib/include -I../../qcadcmd/include -I../../qcadactions/include -I../../dxflib/include -I../../fparser/include -I../../../../../include -I/usr/lib/qt3/include -Imoc/ -o obj/qg_dialogfactory.o qg_dialogfactory.cpp
qg_dialogfactory.cpp: In member function `virtual void QG_DialogFactory::requestPrintPreviewOptions(RS_ActionInterface*, bool, bool)':
qg_dialogfactory.cpp:745: error: ISO C++ forbids declaration of `QG_PrintPreviewOptions' with no type
qg_dialogfactory.cpp:745: error: parse error before `*' token
qg_dialogfactory.cpp:748: error: `toolWidget' undeclared (first use this function)
qg_dialogfactory.cpp:748: error: (Each undeclared identifier is reported only once for each function it appears in.)
qg_dialogfactory.cpp:753: error: parse error before `(' token
qg_dialogfactory.cpp:745: warning: unused variable `int QG_PrintPreviewOptions'
qg_dialogfactory.cpp: In member function `virtual bool QG_DialogFactory::requestModifyEntityDialog(RS_Entity*)':
qg_dialogfactory.cpp:1557: error: `QG_DlgText' undeclared (first use this function)
qg_dialogfactory.cpp:1557: error: parse error before `(' token
qg_dialogfactory.cpp:1558: error: `dlg' undeclared (first use this function)
qg_dialogfactory.cpp: In member function `virtual bool QG_DialogFactory::requestTextDialog(RS_Text*)':
qg_dialogfactory.cpp:1621: error: parse error before `(' token
make[2]: *** [obj/qg_dialogfactory.o] Error 1
make[2]: Leaving directory `/usr/local/src/qcad-2.0.4.0-1.src/qcadguiqt/src'
make[1]: *** [lib/libqcadguiqt.a] Error 2
make[1]: Leaving directory `/usr/local/src/qcad-2.0.4.0-1.src/qcadguiqt'
make: *** [all] Error 2
Building qcadguiqt failed

So, now I guess it is not Qt's fault!
 
Old 11-09-2004, 04:47 PM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
I'm bookmarking your thread, will check it tomorrow (don't have 3.3 here).
 
Old 11-11-2004, 03:18 PM   #5
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Update: I realized I don't have 3.3 (3.2.3 is max and get the same as you in the first post). Will try to domething with it, through.
 
Old 11-13-2004, 05:51 AM   #6
Ryde
LQ Newbie
 
Registered: Nov 2004
Location: Sweden
Distribution: SuSE
Posts: 3

Rep: Reputation: 0
I've managed to get past this error by modifying line 512 in file qcadlib/src/filters/rs_filterdxf.cpp

from:
mtext+=data.text;

to:
mtext+=data.text.c_str();

But it's still compiling so don't hold your breath yet...
I'm using suse 8.2, qt 3.1.1 and so on... so it's a bit old.
 
Old 11-13-2004, 10:07 AM   #7
Ryde
LQ Newbie
 
Registered: Nov 2004
Location: Sweden
Distribution: SuSE
Posts: 3

Rep: Reputation: 0
Ok, there is some more tweaks.

Remove the duplicate const in several of the static declarations in (there are many):
qcadguiqt/src/ui/qg_dlgtext.cpp
qcadguiqt/src/ui/qg_printpreviewoptions.cpp

Modify qcad/src/qc_applicationwindow.cpp row 994 to:
helpManual = new QAction(tr("Manual"), QPixmap::fromMimeSource("contents.png"), tr("&Manual"), Key_F1, this);

Now it compiles and works nicely.
 
Old 11-13-2004, 10:51 AM   #8
gattumarrudu
LQ Newbie
 
Registered: Mar 2004
Location: Sardinia (Italy)
Distribution: Gentoo / SuSE
Posts: 15

Original Poster
Rep: Reputation: 0
Qcadguiqt and rs_filterdxf compile without tweaking, but mine stops at qcadlib.
 
Old 11-13-2004, 01:48 PM   #9
Ryde
LQ Newbie
 
Registered: Nov 2004
Location: Sweden
Distribution: SuSE
Posts: 3

Rep: Reputation: 0
I did not get the error you had in post #3, only the one in post #1 and I did not upgrade qt to 3.3. Solved it whithout upgrading (I'm running suse 8.2, so upgrade qt seems a bit risky to me).

Your second problem is more strange... Looks like g++ has changed it's default behaviour...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
qcad question mfox Linux - Software 4 08-27-2005 01:00 PM
Various Compiling Errors (GCC compiling Openal, GUIlib, xmms-wma) gregorya Linux - Software 2 08-27-2004 05:03 AM
VNC Works then stops! Reboot fixes but then it stops again! Leethal Linux - Software 1 02-26-2004 07:57 AM
errors from mak/gcc compiling qcad wgself Programming 1 01-08-2004 07:51 AM
Evaluation of QCad program? carlos123 Linux - Software 4 11-18-2003 05:32 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration