LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   problem when building a project using qt on kdevelop (http://www.linuxquestions.org/questions/programming-9/problem-when-building-a-project-using-qt-on-kdevelop-565648/)

brownflamigo1 06-30-2007 12:18 PM

problem when building a project using qt on kdevelop
 
Hello all...
I am trying to play with Qt 4.2 @ kdevelop, by just creating some simple app, but as I try to build it I am getting the following error.

Quote:

autom4te: unknown language: Autoconf-without-aclocal-m4
aclocal: /usr/local/bin/autom4te failed with exit status: 1
make[1]: *** [cvs] Error 1
make: *** [all] Error 2
*** Exited with status: 2 ***
What is wrong, any idea

Mara 07-01-2007 02:46 PM

Check if you have autoconf and automake installed. It looks that they're missing.

brownflamigo1 07-02-2007 03:41 AM

I checked for both automake and autoconf, and I do have them installed.

Now, it gives me this error:

Quote:

./admin/cvs.sh: 651: --version: not found
*** AUTOCONF NOT FOUND!.
*** KDE requires autoconf 2.53 or newer
make[1]: *** [cvs] Error 1
make: *** [all] Error 2
*** Exited with status: 2 ***
and I checked that I have the 2.61-3 autoconf installed.
but it is still not working.
I found somewhere that the problem may result because of incamaptability of autoconf and automake(like, the versions are incamaptible to be working with each other).can that be a reason for the problem, and if yes, how can I find out what are the compatible version for me?
I am using:
Kdevelop 3.4.0 (Using KDE 3.5.6)
gcc 4.1.2
g++ 4.1.
trying to create "something simple" with Qt (using designer-qt4)
automake 1.10


thanks alot

Mara 07-02-2007 03:43 PM

You may try installing libtool (that may be one of the things missing). I'd like to see the lines near 651 of /admin/cvs.sh (generated in your project), 645 to 655 would be OK.

brownflamigo1 07-03-2007 01:45 AM

Hey, hello and thatns for helping out.

I checked, and indeed there was no libtool installed, so I installed it, but it still gives me a problem when I compile.

All steps upto the "make" are working, and are not giving me any problem. At "make" I am getting a problem though:

Quote:

Making all in src
make[2]: Entering directory `/home/nikolay/projects/the_new/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/kde -I/usr/share/qt3/include -I. -DQT_THREAD_SUPPORT -D_REENTRANT -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -MT the_newwidget.o -MD -MP -MF ".deps/the_newwidget.Tpo" \
-c -o the_newwidget.o `test -f 'the_newwidget.cpp' || echo './'`the_newwidget.cpp; \
then mv -f ".deps/the_newwidget.Tpo" ".deps/the_newwidget.Po"; \
else rm -f ".deps/the_newwidget.Tpo"; exit 1; \
fi
the_newwidget.cpp: In member function ‘virtual void the_newWidget::button_clicked()’:
the_newwidget.cpp:36: error: ‘label’ was not declared in this scope
make[2]: *** [the_newwidget.o] Error 1
make[2]: Leaving directory `/home/nikolay/projects/the_new/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/nikolay/projects/the_new'
make: *** [all] Error 2
This line 36, and the "label was not declared". The thing is that I am just trying to run the automatically generated code, and I havent added anything to it yet. Like, I havent added any buttons or etc...

danke
nik

Mara 07-03-2007 03:16 PM

Now there's a problem with the code generated. Much better because we're in the real stuff now. Have you modified the code, added something etc? If not, which project have you choosen? When I'm taking sample qmake project (the one with window, menu etc) it compiles and works ok.

Or just paste the file the_newwidget.cpp It should be easily fixable.

graemef 07-03-2007 11:41 PM

are you using qmake? With QT projects you want to use the make tool that comes with QT.

brownflamigo1 07-10-2007 08:38 AM

Hello again.
Yeah, thanks guy. I did finally manage to compile and run the whole thing.
The problem was in the fact that I should have used designer-qt3 instead of the fourth one.
I havent properly installed the qt4 or something, I dont really remember anymore what messages I was getting while installing it, but there was something wrong, while the qt3 was installed properly, and it worked.
Sorry for not replying on time. Just got too much into it:)
heh

And, one more PROBLEM now:
I am trying to use some qwt, and I sincerely cannot find "a newbie understandable/friendly" installation guide.
I did download the tar qwt-4.2.0, unpacked it, and checked the INSTALL that is inside the folders. Run the whole procedure (like installed examples, qt designer 3 plugin, etc...) , and now there is a tab called "qwt" in the designer, BUT :), when I try to build a simple app of just a regular qwt_plot and a button, this is the message I am getting...

Code:

cd '/home/nikolay/projects/GPSSystem' && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" make -k
make all-recursive
Making all in doc
Making all in .
make[3]: Nothing to be done for `all-am'.
Making all in en
make[3]: Nothing to be done for `all'.
Making all in po
make[2]: Nothing to be done for `all'.
Making all in src
linking gpssystem (g++)
gpssystemdialog.o: In function `GpsSystem::languageChange()':
gpssystemdialog.cpp:(.text+0xf09): undefined reference to `QwtPlot::setTitle(QString const&)'
gpssystemdialog.o: In function `GpsSystem::GpsSystem(QWidget*, char const*, unsigned int)':
gpssystemdialog.cpp:(.text+0x261c): undefined reference to `QwtPlot::QwtPlot(QWidget*, char const*)'
gpssystemdialog.cpp:(.text+0x26af): undefined reference to `QwtPlot::setTitleFont(QFont const&)'
gpssystemdialog.o: In function `GpsSystem::GpsSystem(QWidget*, char const*, unsigned int)':
gpssystemdialog.cpp:(.text+0x426c): undefined reference to `QwtPlot::QwtPlot(QWidget*, char const*)'
gpssystemdialog.cpp:(.text+0x42ff): undefined reference to `QwtPlot::setTitleFont(QFont const&)'
collect2: ld returned 1 exit status
make[2]: *** [gpssystem] Error 1
make[2]: Target `all' not remade because of errors.
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
*** Exited with status: 2 ***


I dont know what causes the error, I thought that may be header files(namely <qwt_plot.h>), but I checked it, and I think it is okay, placed in the /usr/include/qwt
So, what should I do, please help out.
Thanks

brownflamigo1 07-10-2007 10:33 AM

And now, I have tried to install qwt 5.0.2, and I am getting a different error message:

Code:

cd '/home/nikolay/projects/GPSSystem' && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" make -k
make all-recursive
Making all in doc
Making all in .
make[3]: Nothing to be done for `all-am'.
Making all in en
make[3]: Nothing to be done for `all'.
Making all in po
make[2]: Nothing to be done for `all'.
Making all in src
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/kde -I/usr/share/qt3/include -I. -DQT_THREAD_SUPPORT -D_REENTRANT -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -MT gpssystemdialog.o -MD -MP -MF ".deps/gpssystemdialog.Tpo" -c -o gpssystemdialog.o `test -f 'gpssystemdialog.cpp' || echo './'`gpssystemdialog.cpp; then mv -f ".deps/gpssystemdialog.Tpo" ".deps/gpssystemdialog.Po"; else rm -f ".deps/gpssystemdialog.Tpo"; exit 1; fi
In file included from /usr/share/qt3/include/qwt_plot.h:21,
from gpssystemdialog.cpp:22:
/usr/share/qt3/include/qwt_symbol.h:17:17: error: qwt.h: No such file or directory
/usr/share/qt3/include/qwt_plot.h:137: error: ‘Qwt’ has not been declared
/usr/share/qt3/include/qwt_plot.h:138: error: ‘Qwt’ has not been declared
/usr/share/qt3/include/qwt_plot.h:139: error: ‘Qwt’ has not been declared
/usr/share/qt3/include/qwt_plot.h:140: error: ‘Qwt’ has not been declared
/usr/share/qt3/include/qwt_plot.h:178: error: ‘Qwt’ has not been declared
/usr/share/qt3/include/qwt_plot.h:178: error: expected ‘,’ or ‘...’ before ‘os’
/usr/share/qt3/include/qwt_plot.h:179: error: ‘Qwt’ has not been declared
/usr/share/qt3/include/qwt_plot.h:179: error: ISO C++ forbids declaration of ‘Shape’ with no type
/usr/share/qt3/include/qwt_plot.h:179: error: expected ‘;’ before ‘outlineStyle’
make[2]: *** [gpssystemdialog.o] Error 1
make[2]: Target `all' not remade because of errors.
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
*** Exited with status: 2 ***

getting frustrated.....spent whole day today on this guy.

Thanks
Nik

Mara 07-16-2007 02:20 PM

It seems you don't have Qwt installed. Go here: http://qwt.sourceforge.net/

brownflamigo1 07-17-2007 08:39 AM

Yes, indeed. I tried installing it, and it did work out.
Thanks
nik


All times are GMT -5. The time now is 02:08 AM.