user573014
user573014

Reputation: 725

compiling windows Qt code in Linux and changes in libraries

I have a code which was developed in Qt (Windows Environment) and I wanted to compile it in Linux, I have noticed that there are some differences libraries and I could figure two out of them, but I failed to find the rest.. I would like to ask for the help of anyone who have been through this problem:

in Windows:

LIBS += -lopengl32 \
-lglu32 \
-lcomdlg32 \
-lQAxServerd \
-lphonond4

to Linux:

LIBS += -lGL \
-lGLU \

now for the QAxserver .. I don't have it in my QT environment and I couldn't find place where I can download it!

Upvotes: 2

Views: 261

Answers (2)

air-dex
air-dex

Reputation: 4178

In your_project.pro file:

win32 {
    LIBS += \
        -lopengl32 \
        -lglu32 \
        -lcomdlg32 \
        -lQAxServerd \
        -lphonond4
}
linux {
    LIBS += -lGL -lGLU
}

Upvotes: 0

Nikos C.
Nikos C.

Reputation: 51910

QAxServer is part of Qt's ActiveX module, called "ActiveQt." ActiveX is a Windows-only framework by Microsoft. You won't find it implemented anywhere else. There is no equivalent. If you use that module in an application, that application stops being portable to non-Windows platforms.

Same goes for comdlg32. This is a Windows library by Microsoft. It's not portable. If the application makes direct calls to this, you need to re-implement that part.

phonond4 though is Qt's Phonon module. That is portable. You don't need to link to it. You only need to add QT += phonon in the project file.

In short: you need to re-implement any parts of the application that make calls to Windows-specific libraries.

Upvotes: 3

Related Questions