2

I'm trying to compile miktex 2.8 on ubuntu 11.10. I've installed all the necessary libs. But when compiling the source, I get this kind of error:

RepositoryTableModel.cpp:(.text+0x48b): undefined reference to QAbstractItemModel::headerData(int, Qt::Orientation, int) const'
RepositoryTableModel.cpp:(.text+0x4c8): undefined reference to `QMetaObject::tr(char const*, char const*) const'
RepositoryTableModel.cpp:(.text+0x4d7): undefined reference to `QVariant::QVariant(QString const&)'
RepositoryTableModel.cpp:(.text+0x4f1): undefined reference to `QString::free(QString::Data*)'
RepositoryTableModel.cpp:(.text+0x518): undefined reference to `QMetaObject::tr(char const*, char const*) const'
RepositoryTableModel.cpp:(.text+0x527): undefined reference to `QVariant::QVariant(QString const&)'
RepositoryTableModel.cpp:(.text+0x545): undefined reference to `QString::free(QString::Data*)'
RepositoryTableModel.cpp:(.text+0x570): undefined reference to `QMetaObject::tr(char const*, char const*) const'
RepositoryTableModel.cpp:(.text+0x57f): undefined reference to `QVariant::QVariant(QString const&)'
RepositoryTableModel.cpp:(.text+0x59d): undefined reference to `QString::free(QString::Data*)'
RepositoryTableModel.cpp:(.text+0x5c8): undefined reference to `QMetaObject::tr(char const*, char const*) const'
RepositoryTableModel.cpp:(.text+0x5d7): undefined reference to `QVariant::QVariant(QString const&)'
RepositoryTableModel.cpp:(.text+0x5f5): undefined reference to `QString::free(QString::Data*)'
RepositoryTableModel.cpp:(.text+0x620): undefined reference to `QMetaObject::tr(char const*, char const*) const'
RepositoryTableModel.cpp:(.text+0x62f): undefined reference to `QVariant::QVariant(QString const&)'
RepositoryTableModel.cpp:(.text+0x64d): undefined reference to `QString::free(QString::Data*)'

These are just few of them. I thought there were some missing libs, I installed the Qt SDK but still getting the same problem.

Can anyone help?

sarnold
  • 102,305
  • 22
  • 181
  • 238
Joseph Elcid
  • 887
  • 1
  • 6
  • 21

1 Answers1

3

Try this:

apt-get install libqt4-dev

You need the -dev versions of library packages to provide the header files that declare new data types, function prototypes, etc. (Most library packages provide a -dev version, though a handful provide the headers in the main package.)

sarnold
  • 102,305
  • 22
  • 181
  • 238
  • I've already done that and the problem still remains. May be it hasn't been added to the env? – Joseph Elcid Jan 20 '12 at 00:12
  • Try re-running the `cmake -G "Unix Makefiles"` command after installing the libqt4-dev package. I tried to build miktex on my Ubuntu 11.04 system and got a long way -- until `PackageTableModel.cpp`, which fails with: `error: conversion from 'size_t' to 'QVariant' is ambiguous`, which is a ways outside of my C++ comfort zone. – sarnold Jan 20 '12 at 00:33