[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#337297: libqt4-dev: qmake-qt4 - i think there is a real link problem

Package: libqt4-dev
Version: 4.1.0-3
Followup-For: Bug #337297

Hello there. I am trying to build this small Qt4 program :

main.cpp : -------------------------
#include <QApplication>
#include <QGLWidget>

int main(int argc, char *argv[])
  QApplication app(argc, argv);
  QGLWidget main_win;
  return app.exec();

I run 'qmake-qt4 -project', and here's the content of my project file :


# Input
SOURCES += main.cpp

As documented in the Qt4 doc, I need to add 'QT += opengl' so I could use QGLWidget. (I added that line, below INCLUDEPATH)

I then run 'qmake-qt4', and 'make'. And here's the output :

-I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL 
-I/usr/include/qt4 -I. -I/usr/X11R6/include -I. -I. -o main.o main.cpp
g++  -o foobar main.o   -L/usr/lib -L/usr/X11R6/lib -lQtOpenGL -lQtGui -lQtCore -lGLU -lGL -lpthread
/usr/lib/libGL.a(glxcmds.o): In function `glXGetMscRateOML': undefined reference to `XF86VidModeQueryVersion'
/usr/lib/libGL.a(glxcmds.o): In function `glXGetMscRateOML': undefined reference to `XF86VidModeGetModeLine'
collect2: ld returned 1 exit status
make: *** [foobar] Error 1

So, you see the problem. It is a simple Qt4 application, with nothing else than a QGLWidget. Qt4 needs 'QT += opengl' to be added 
to the project file, as documented. But, as far as I know, there is no need to add anything else to the project file. Project 
files are supposed to be "platform independant". So, what's missing here?

Thanks for your help. :-)

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.4.27-2-k7-smp
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1) (ignored: LC_ALL set to en_US.ISO-8859-1)

Versions of packages libqt4-dev depends on:
ii  libaudio-dev             1.7-3           The Network Audio System (NAS). (d
ii  libfreetype6-dev         2.1.7-2.4       FreeType 2 font engine, developmen
ii  libglu1-xorg-dev [libglu 6.9.0.dfsg.1-4  Mesa OpenGL utility library develo
hi  libice-dev               6.8.2.dfsg.1-11 Inter-Client Exchange library deve
ii  libjpeg62-dev            6b-11           Development files for the IJG JPEG
ii  libmng-dev               1.0.8-1         M-N-G library (Development headers
ii  libpng12-dev [libpng12-0 1.2.8rel-5      PNG library - development
ii  libqt4-core              4.1.0-3         Qt 4 core non-GUI functionality ru
ii  libqt4-gui               4.1.0-3         Qt 4 core GUI functionality runtim
ii  libqt4-qt3support        4.1.0-3         Qt 3 compatibility library for Qt 
ii  libqt4-sql               4.1.0-3         Qt 4 SQL database module
hi  libsm-dev                6.8.2.dfsg.1-11 X Window System Session Management
ii  libx11-dev               6.9.0.dfsg.1-4  X Window System protocol client li
ii  libxcursor-dev           1.1.3-1         X cursor management library (devel
ii  libxext-dev              6.9.0.dfsg.1-4  X Window System miscellaneous exte
ii  libxft-dev               2.1.7-1         FreeType-based font drawing librar
ii  libxi-dev                6.9.0.dfsg.1-4  X Window System Input extension li
ii  libxinerama-dev          6.9.0.dfsg.1-4  X Window System multi-head display
ii  libxmu-dev               6.9.0.dfsg.1-4  X Window System miscellaneous util
ii  libxrandr-dev            6.9.0.dfsg.1-4  X Window System Resize, Rotate and
ii  libxrender-dev           1:     X Rendering Extension client libra
ii  libxt-dev                6.9.0.dfsg.1-4  X Toolkit Intrinsics development f
hi  x-dev                    6.8.2.dfsg.1-11 X protocol development files
ii  xlibmesa-gl-dev [libgl-d 6.9.0.dfsg.1-4  Mesa 3D graphics library developme
ii  xlibs-static-pic         6.9.0.dfsg.1-4  X Window System client extension l
ii  zlib1g-dev               1:1.2.3-9       compression library - development

Versions of packages libqt4-dev recommends:
ii  qt4-dev-tools                 4.1.0-3    Qt 4 development tools

-- no debconf information

Reply to: