Lösung QT 4.0 und MS VS C++ 2003



  • Ich hab mal alle Quellen im Internet gesammelt und eine Zusammenfassung ge-
    schrieben mit der ihr eine Open-Source ähnliche Version der QT für das MS
    VS C++ 2003 zum Laufen bekommt.

    // Edit: Hab ich aus dem Netz genommen, weil mitleerweile einfachere und
    von der Lizensierung unbedenklichere Varianten möglich sind. Siehe weiter
    unten im Thread.

    Bitte beachtet sowohl die Lizenz der Evaluations als auch der Open Source
    Version und lest euch den "Lizenzen" Abschnitt in dem Dokument durch!

    Ich hab es ähnliche aufgebaut, wie das FAQ Dokument zu Dev-Cpp.



  • Danke. 🙂 🙂

    Aber was ist mit dem MOC? Der muss doch vor jedem Compilieren aufgerufen werden oder nicht? 😕



  • qt-neuling schrieb:

    Danke. 🙂 🙂

    Aber was ist mit dem MOC? Der muss doch vor jedem Compilieren aufgerufen werden oder nicht? 😕

    Bei allem was ich bislang probiert hatte brauchte ich nur das Projekt
    kompilieren und fertig war die ausführbare Datei mit QT Code. Ich hab
    bis heute noch nie was mit der QT gemacht, weshalb ich nicht mal weiß
    was der MOC ist 🤡



  • Achso das brauch man nur bei Quelltexten wo Q_OBJECT drin vorkommt. Na ja, in deinem HelloWorld Programm ist das ja nicht.



  • MOC ist so ein Präprozessor von Qt, der nochmal vor dem normalen Präprozessor läuft.



  • Gleichzeitig gibt es noch das Projekt qtwin auf sourceforge, dass es wohl mit
    ein bisschen Bastelei vollkommen legal ermöglicht an ein Open Source QT 4.0
    für MS VS heranzukommen. Die kommen nur mit GPL Dateien aus - werd ich auch
    mal morgen antesten, ob ich damit ein lauffähiges QT hinbekomme. Hab schon
    von einigen gelesen, dass es wohl funktioniert 👍



  • Ohne MOC kommt ein Qt-Programmierer nicht weit.
    Normalerweise benötigt man den, sobald man SIGNAL/SLOT - Sachen in seinem Programm benutzt. Sprich: Wenn der MOC nicht läuft kannst du im Programm nicht auf Benutzereingaben reagieren. Glaube nicht das das so sinnvoll ist. 😃

    Es gibt doch eh freie Versionen für Windows...

    Gruß



  • Da es heißt es sei so eine voll funktionsfähige QT Version wird der MOC wohl
    funktionieren - auf jeden Fall wird er mit compiliert.

    Und nein: Es gibt keine freie Version für MS VS, sondern nur für MinGW.



  • Ah, sry. Grad gesehen das 4.0 nicht für VS ist.
    Hab gehört das Qt 4 eh nicht soo toll sein soll. Selbst hab ich noch nicht getestet, vertraue da aber eigentlich auf meinen Arbeitskollegen.
    Bin momentan mit 3.3.3 sehr zufrieden.
    Daheim hab ich auch ne Weile mit 3.2 entwickelt, die Version gabs nämlich mit Visual Studio - Unterstützung auf dem Buch "GUI Programming with QT".

    Gruß



  • EnERgYzEr schrieb:

    Gleichzeitig gibt es noch das Projekt qtwin auf sourceforge ...

    hast du einen link? ich finde nur anweisungen für Qt 3.x 🙂



  • CVSROOT: :pserver:anonymous@cvs.sourceforge.net:/cvsroot/qtwin
    Module: qt-4
    Branch: HEAD, tagged with 'qt_4_0_0'

    🙂



  • danke. 🙂



  • Zitat aus qt-interest-Liste

    > I want to switch from MFC to QT but keep the VS 2003 IDE. Is there any
    > possibility to compile the Open Source version of QT with the MS C++
    > 2003 compiler?

    > Nope, sorry. Not unless you do the port, that is.

    > I guess all you need to do is workout the QMAKESPECS for MSVC.net,
    > that's all...I think you can get some hint from the QT 3.3.X free port
    > to Windows. I'm sure someone will come up with this very soon...

    There is also a small modification to do in metamakefile.cpp, and some
    generators to add in qmake/generators.

    I recently compiled Qt with the freely available VC++.net 2005 beta 2,
    with some files imported from the QtWin project (I had to make some
    small modifications).

    I put all the required files here:
    http://perso.numericable.fr/~jlloicjoly40/c++/patchQT4.0.0win.zip

    Please not that those files are distributed along the GPL, and cannot be
    used for non GPL project.

    By the way, to answer some points I read in other threads:
    - If I can afford a commercial compiler, I can afford a commercial Qt:
    - If I have 1000€ to spend, I can afford one thing that cost 1000€,
    not two.
    - Commercial compilers can be available for free (VC++.net2003,
    VC++.NET 2005 beta2 for instance)
    - To have portable code, the best is to use the same compiler
    - To have truely portable and higher quality code, the best is in fact
    to use many compilers, even on only one platform.

    I am sad to say that I tried to use mingw, but although functionnal this
    is not my compiler of choice on windows: It is very slow to compile,
    generate slow code,... Tying the use of GPL Qt on windows with mingw
    will imply that GPL Qt programs will run slower that commercial
    alternatives.


Anmelden zum Antworten