Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Fedora 36; Homebrew desktop with Ryzen 5600G and 32Gb. Using Red Hat since 1998
Posts: 304
Rep:
Error when compiling app against Qt4
I run FC11 on an x86_64 Thinkpad T61.
Currently trying to build unixODBC.
I have Qt3.3 and Qt4 installed.
Code:
configure
identifies the Qt version as 040503.
I have to run configure as "./configure --with-qt-libraries=/usr/lib64", or the Qt libraries are not found.
My problem is during make. The following error occurs:
Code:
mCAbout.cpp:15:34: error: private/qucomextra_p.h: No such file or directory
mCAbout.cpp:17:2: error: #error "This file was generated using the moc from 3.3.8b. It"
mCAbout.cpp:18:2: error: #error "cannot be used with the include files
from this version of Qt."
mCAbout.cpp:19:2: error: #error "(The moc has changed too much.)"
Code:
locate
finds
Code:
/usr/lib64/qt-3.3/include/private/qucomextra_p.h
Evidently, I do not have a qucomextra_p.h for Qt4. Am I supposed to have one, or do I have to run something to generate it, or what? mCAbout.cpp starts off as follows:
Code:
/****************************************************************************
** CAbout meta object code from reading C++ file 'CAbout.h'
**
** Created: Wed Dec 16 14:46:48 2009
** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#undef QT_NO_COMPAT
#include "CAbout.h"
#include <qmetaobject.h>
#include <qapplication.h>
#include <private/qucomextra_p.h>
#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
#error "This file was generated using the moc from 3.3.8b. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
Distribution: Fedora 36; Homebrew desktop with Ryzen 5600G and 32Gb. Using Red Hat since 1998
Posts: 304
Original Poster
Rep:
Thanks for the idea, but no dice. I still get the same error.
However, it seems reasonable that the Qt MOC - whatever that is - which is being used to generate mCAbout.cpp must be the Qt3.3 version, not the Qt4 one. What is the Qt MOC and how do I find it/specify which one to use? I tried "locate moc_yacc" with no results.
Alternatively, do I need to specify additional Qt directories (for include files etc) when I run configure? I notice that /usr/lib64/qt-3.3 contains an "include" subdirectory, but /usr/lib64/qt4 does not. The configure script finds Qt4 include files in /usr/include.
If configure is picking up bits of Qt3.3 and bits of Qt4, how do I clean this up? Or do I just abandon trying to build this GUI - sigh.
I can correct QTLIB to /usr/lib64/qt4, but I don't know what to put for QTINC, because /usr/lib64/qt4/include does not exist.
Code:
[doug@cardraeh unixODBC-2.2.14]$ ls /usr/lib64/qt-3.3
bin include lib mkspecs phrasebooks plugins templates translations
[doug@cardraeh unixODBC-2.2.14]$ ls /usr/lib64/qt4
bin mkspecs phrasebooks plugins q3porting.xml qsci
/usr/include/qt4 for the include (if its where your distribution store, it, check in your package manager)
as for libs, it is /usr/lib64/qt4
I am not sure about Qt dir, I have a separated one compiled from Git (I am a KDE-apps dev), so mine host all the bins/libs/includes/doc file. It work just fine, you could do the same, its quite easy in fact, just follow those instructions: http://techbase.kde.org/Getting_Started/Build/KDE4
After setting your kde-devel account and .bashrc, you will have a sandbox where Qt/KDE apps will compile fine and be separated from files managed by your system. It create a much cleaner system when you have separated development environment. You will have to do the optional compiling of qt-copy in order to have better results than you currently have.
You can then "include" the sandbox packages in your regular coount by adding an entry in your PATH variable.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.