ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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:
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.
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).
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
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);
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...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.