LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   kdevelop 3.5.1 won't compile (https://www.linuxquestions.org/questions/linux-software-2/kdevelop-3-5-1-wont-compile-642311/)

binarybob0001 05-15-2008 02:32 AM

kdevelop 3.5.1 won't compile
 
I'm trying to compile kdevelop 3.5.1 on Slackware 12.0. When I try to make it I get an error. Here's the output.
Code:

make  all-recursive
make[1]: Entering directory `/home/bobby/kdevelop-3.5.1'
Making all in lib
make[2]: Entering directory `/home/bobby/kdevelop-3.5.1/lib'
Making all in util
make[3]: Entering directory `/home/bobby/kdevelop-3.5.1/lib/util'
/bin/sh ../../libtool --silent --tag=CXX  --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I../../lib/compat  -I../../lib/interfaces  -I../../lib/sourceinfo  -I/usr/lib/qt/include -I.  -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -MT blockingkprocess.lo -MD -MP -MF .deps/blockingkprocess.Tpo -c -o blockingkprocess.lo blockingkprocess.cpp
In file included from blockingkprocess.cpp:105:
blockingkprocess.moc:12:2: error: #error "The header file 'blockingkprocess.h' doesn't include <QObject>."
blockingkprocess.moc:20: error: expected constructor, destructor, or type conversion before 'static'
blockingkprocess.moc:47: error: 'const QMetaObject BlockingKProcess::staticMetaObject' is not a static member of 'class BlockingKProcess'
blockingkprocess.moc:47: error: variable 'const QMetaObject BlockingKProcess::staticMetaObject' has initializer but incomplete type
blockingkprocess.moc:49: error: 'qt_meta_data_BlockingKProcess' was not declared in this scope
blockingkprocess.moc:52: error: prototype for 'const QMetaObject* BlockingKProcess::metaObject() const' does not match any in class 'BlockingKProcess'
blockingkprocess.h:33: error: candidate is: virtual QMetaObject* BlockingKProcess::metaObject() const
blockingkprocess.moc:52: error: 'const QMetaObject* BlockingKProcess::metaObject() const' cannot be overloaded
blockingkprocess.h:33: error: with 'virtual QMetaObject* BlockingKProcess::metaObject() const'
blockingkprocess.moc: In member function 'const QMetaObject* BlockingKProcess::metaObject() const':
blockingkprocess.moc:54: error: cannot convert 'QMetaObject* (*)()' to 'const QMetaObject*' in return
blockingkprocess.moc: At global scope:
blockingkprocess.moc:57: error: no 'void* BlockingKProcess::qt_metacast(const char*)' member function declared in class 'BlockingKProcess'
blockingkprocess.moc: In member function 'void* BlockingKProcess::qt_metacast(const char*)':
blockingkprocess.moc:62: error: 'qt_metacast' is not a member of 'KProcess'
blockingkprocess.moc: At global scope:
blockingkprocess.moc:65: error: 'int BlockingKProcess::qt_metacall' is not a static member of 'class BlockingKProcess'
blockingkprocess.moc:65: error: incomplete type 'QMetaObject' used in nested name specifier
blockingkprocess.moc:65: error: expected primary-expression before 'int'
blockingkprocess.moc:65: error: expected primary-expression before 'void'
blockingkprocess.moc:65: error: initializer expression list treated as compound expression
blockingkprocess.moc:66: error: expected ',' or ';' before '{' token
blockingkprocess.moc:81: error: expected constructor, destructor, or type conversion at end of input

This looks like the output the compiler gives when moc is not run on a .cpp file, but why isn't this being done?

binarybob0001 05-15-2008 04:59 AM

Ok, I know what's going on. I recently installed qt-4.4.0 and hence installed another version of moc which requires that the header file QtCore/QObject, not qobject.h, be included in a header file which includes Q_OBJECT. The problem is that the moc generated from my qt-4.4.0 installation conflicts with the moc generated from my qt-3.3.0 installation. Both versions are included in my PATH variable. One located in /usr/bin, the other in /usr/lib/qt/bin.
Code:

bobby@Veronica:~$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/java/bin:/usr/lib/java/jre/bin:/usr/lib/qt/bin:/usr/share/texmf/bin:.

How do I tell make which moc to use explicitly? Currently, the moc used defaults to 4.4.0 version.

Peterius 11-19-2008 11:09 AM

You probably figured this out months ago, being that its now mid november, but you would need to use "./configure --with-qt-dir=/path/to/qt3" where the moc is in the bin directory in that path.


All times are GMT -5. The time now is 01:31 PM.