qt integriert in Visual C++
-
kleineSchildy
- Beiträge: 76
- Registriert: 16. September 2004 18:29
- Wohnort: Dresden
qt integriert in Visual C++
Hallo Qt-Freunde,
ich bin leider etwas überfordert. Auf Arbeit benutze ich QT und begeistert. Dort habe ich alles im Visual C++ intergriert und es funktioniert toll.
Nun möchte ich es auch für zu Hause.
Visual C++ ist schon installiert und ich habe mir auf der Trolltech.com Seite auch schon folgendes runtergeladen:
qt-win-opensource-desktop-4.0.0
Nur irgendwie installieren läßt sich da nix so richtig. Ich führe auf der Konsole die configure.exe aus und da kommt ja die Frage, ob ich die Lizenz akzeptiere. Da drücke ich y und dann passiert nix mehr. Es hört einfach auf.
Wo liegt mein Fehler?
Viele Grüße
Jana
ich bin leider etwas überfordert. Auf Arbeit benutze ich QT und begeistert. Dort habe ich alles im Visual C++ intergriert und es funktioniert toll.
Nun möchte ich es auch für zu Hause.
Visual C++ ist schon installiert und ich habe mir auf der Trolltech.com Seite auch schon folgendes runtergeladen:
qt-win-opensource-desktop-4.0.0
Nur irgendwie installieren läßt sich da nix so richtig. Ich führe auf der Konsole die configure.exe aus und da kommt ja die Frage, ob ich die Lizenz akzeptiere. Da drücke ich y und dann passiert nix mehr. Es hört einfach auf.
Wo liegt mein Fehler?
Viele Grüße
Jana
-
kleineSchildy
- Beiträge: 76
- Registriert: 16. September 2004 18:29
- Wohnort: Dresden
Also in configure -help habe ich ja einiges gefunden, aber was um Himmels willen soll ich nehmen??? Kann mir da jemand helfen? Wie sieht meine installationsanweisung aus, wenn ich es als Plugin für VC++ haben möchte?
Jana
Viele GrüßeUsage: configure [-prefix dir] [-bindir <dir>] [-libdir <dir>]
[-docdir <dir>] [-headerdir <dir>] [-plugindir <dir>]
[-datadir <dir>] [-translationdir <dir>]
[-examplesdir <dir>] [-demosdir <dir>][-buildkey <key>]
[-release] [-debug] [-debug-and-release] [-shared] [-static]
[-no-fast] [-fast] [-no-exception] [-exception]
[-no-accessibility] [-accessibility] [-no-rtti] [-rtti]
[-no-stl] [-stl] [-no-sql-<driver>] [-qt-sql-<driver>]
[-plugin-sql-<driver>] [-arch <arch>] [-platform <spec>]
[-qconfig <local>] [-D <define>] [-I <includepath>]
[-L <librarypath>] [-help] [-no-dsp] [-dsp] [-no-vcproj]
[-vcproj] [-no-qmake] [-qmake] [-dont-process] [-process]
[-no-style-<style>] [-qt-style-<style>] [-redo]
[-saveconfig <config>] [-loadconfig <config>] [-no-zlib]
[-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libpng]
[-qt-libpng] [-system-libpng] [-no-libjpeg] [-qt-libjpeg]
[-system-libjpeg]
Installation options:
These are optional, but you may specify install directories.
-prefix dir ........ This will install everything relative to dir
(default $QT_INSTALL_PREFIX)
You may use these to separate different parts of the install:
-bindir <dir> ...... Executables will be installed to dir
(default PREFIX/bin)
-libdir <dir> ...... Libraries will be installed to dir
(default PREFIX/lib)
-docdir <dir> ...... Documentation will be installed to dir
(default PREFIX/doc)
-headerdir <dir> ... Headers will be installed to dir
(default PREFIX/include)
-plugindir <dir> ... Plugins will be installed to dir
(default PREFIX/plugins)
-datadir <dir> ..... Data used by Qt programs will be installed to dir
(default PREFIX)
-translationdir <dir> Translations of Qt programs will be installed to dir
(default PREFIX/translations)
-examplesdir <dir> . Examples will be installed to dir
(default PREFIX/examples)
-demosdir <dir> .... Demos will be installed to dir
(default PREFIX/demos)
You may use these options to turn on strict plugin loading:
-buildkey <key> .... Build the Qt library and plugins using the specified
<key>. When the library loads plugins, it will only
load those that have a matching <key>.
Configure options:
The defaults (*) are usually acceptable. If marked with a plus (+) a test for
that feature has not been done yet, but will be evaluated later, the plus
simply denotes the default value. Here is a short explanation of each option:
-release ........... Compile and link Qt with debugging turned off.
-debug ............. Compile and link Qt with debugging turned on.
* -debug-and-release . Compile and link two Qt libraries, with and without
debugging turned on.
* -shared ............ Create and use shared Qt libraries.
-static ............ Create and use static Qt libraries.
* -no-fast ........... Configure Qt normally by generating Makefiles for all
project files.
-fast .............. Configure Qt quickly by generating Makefiles only for
library and subdirectory targets. All other Makefiles
are created as wrappers which will in turn run qmake
-no-exception ...... Disable exceptions on platforms that support it.
* -exception ......... Enable exceptions on platforms that support it.
-no-accessibility .. Do not compile Windows Active Accessibilit support.
* -accessibility ..... Compile Windows Active Accessibilit support.
-no-stl ............ Do not compile STL support.
* -stl ............... Compile STL support.
-no-sql-<driver> ... Disable SQL <driver> entirely, by default none are
turned on.
-qt-sql-<driver> ... Enable a SQL <driver> in the Qt Library.
-plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to at run
time.
Available values for <driver>:
mysql
psql
oci
+ odbc
tds
db2
+ sqlite
sqlite2
ibase
(drivers marked with a '+' have been detected as
available on this system)
-platform <spec> ... The operating system and compiler you are building on.
(default %QMAKESPEC%)
See the README file for a list of supported operating
systems and compilers.
-D <define> ........ Add an explicit define to the preprocessor.
-I <includepath> ... Add an explicit include path.
-L <librarypath> ... Add an explicit library path.
-help, -h, -? ...... Display this information.
Third Party Libraries:
-no-zlib ........... Do not compile in ZLIB support. Implies -no-libpng.
-qt-zlib ........... Use the zlib bundled with Qt.
+ -system-zlib ....... Use zlib from the operating system.
See http://www.gzip.org/zlib
* -no-gif ............ Do not compile the plugin for GIF reading support.
-qt-gif ............ Compile the plugin for GIF reading support.
See also src/plugins/imageformats/gif/qgifhandler.h
-no-libpng ......... Do not compile in PNG support.
-qt-libpng ......... Use the libpng bundled with Qt.
+ -system-libpng ..... Use libpng from the operating system.
See http://www.libpng.org/pub/png
-no-libjpeg ........ Do not compile the plugin for JPEG support.
-qt-libjpeg ........ Use the libjpeg bundled with Qt.
+ -system-libjpeg .... Use libjpeg from the operating system.
See http://www.ijg.org
Qt/Windows only:
-no-dsp ............ Do not generate VC++ .dsp files.
* -dsp ............... Generate VC++ .dsp files, only if spec "win32-msvc".
-no-vcproj ......... Do not generate VC++ .vcproj files.
* -vcproj ............ Generate VC++ .vcproj files, only if platform
"win32-msvc.net".
-no-qmake .......... Do not compile qmake.
* -qmake ............. Compile qmake.
-dont-process ...... Do not generate Makefiles/Project files.
* -process ........... Generate Makefiles/Project files.
-no-rtti ........... Do not compile runtime type information.
* -rtti .............. Compile runtime type information.
-arch <arch> ....... Specify an architecture.
Available values for <arch>:
* windows
boundschecker
-no-style-<style> .. Disable <style> entirely.
-qt-style-<style> .. Enable <style> in the Qt Library.
Available styles:
* windows
+ windowsxp
* plastique
* motif
* cde
-qconfig <local> ... Use src/tools/qconfig-local.h rather than the default.
Possible values for local:
minimal
small
medium
large
full
-loadconfig <config> Run configure with the parameters from file configure_
<config>.cache.
-saveconfig <config> Run configure and save the parameters in file
configure_<config>.cache.
-redo .............. Run configure with the same parameters as last time.
Jana
Re: qt integriert in Visual C++
Irgendeine kommerzielle Version nehme ich an.kleineSchildy hat geschrieben:Auf Arbeit benutze ich QT und begeistert. Dort habe ich alles im Visual C++ intergriert und es funktioniert toll.
Und da haben wir auch schon den Haken. Die OpenSource-Version für Windows tut nur mit MinGW. Es gibt allerdings eine Lösung, ich zitiere mal aus der qt-interest-Liste (die solltest Du eigentlich abonniert habenkleineSchildy hat geschrieben:Visual C++ ist schon installiert und ich habe mir auf der Trolltech.com Seite auch schon folgendes runtergeladen:
qt-win-opensource-desktop-4.0.0
>>> 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 projecthad to make some
small modifications).
I put all the required files here:
http://perso.numericable.fr/~jlloicjoly ... 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.
-
kleineSchildy
- Beiträge: 76
- Registriert: 16. September 2004 18:29
- Wohnort: Dresden
Hallo Macman,
danke erstmal für deine Hilfe. Allerdings habe ich keine so richtige Ahnung, wie mich das weiter bringt
Ich habe wirklich KEINE AHNUNG, wie ich QT auf meinen PC bringe. Ich brauche soetwas wie eine Step-by-Step-Anweisung, wie ich von
der entpackten: qt-win-opensource-desktop-4.0.0.zip zu meinem Plugin für VC++ komme. Bzw. meinen Code für Win kompilieren kann.
Ich habe mir nun schon auch das unten genannte Patch runtergeladen.
Was hat es genau mit MingW auf sich?
Waaaa warum wird das alles so kompliziert
Viele Grüße
Jana
danke erstmal für deine Hilfe. Allerdings habe ich keine so richtige Ahnung, wie mich das weiter bringt
Ich habe wirklich KEINE AHNUNG, wie ich QT auf meinen PC bringe. Ich brauche soetwas wie eine Step-by-Step-Anweisung, wie ich von
der entpackten: qt-win-opensource-desktop-4.0.0.zip zu meinem Plugin für VC++ komme. Bzw. meinen Code für Win kompilieren kann.
Ich habe mir nun schon auch das unten genannte Patch runtergeladen.
Was hat es genau mit MingW auf sich?
Waaaa warum wird das alles so kompliziert
Viele Grüße
Jana
MingW ist der gcc unter Windows. Und der ist OpenSource und Kostenlos. Trolltech hat bei der opensource-desktop Edition die VisualC++ UnterstützungkleineSchildy hat geschrieben:Was hat es genau mit MingW auf sich?
entfernt.
Weil Trolltech auch noch mit der kommerziellen Version was verdienen möchte.Waaaa warum wird das alles so kompliziert![]()
Übrigens, dass qtwin Projekt ist mittlerweile sogar soweit, dass es für Qt4 den MSVC, MSVC.NET + IDE Projekt-Dateien und mit Quellcodeänderungen an Qt4 auch Borland C++ unterstützt.
Code: Alles auswählen
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/qtwin login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/qtwin co -P qt-4Andreas
-
BartSimpson
- Beiträge: 1379
- Registriert: 6. November 2004 12:03
- Kontaktdaten:
Das Plugin für den VC++ gibt es in der OpenSourve version für Win nicht.
Offizell geht nur MinGW.
und dort ist die installtion wie folgt:
1. download der folgenden Pakte von www.mingw.org
binutils-2.15.91-20040904-1.tar.gz
gcc-g++-3.4.2-20040916-1.tar.gz
mingw32-make-3.80.0-3.tar.gz
mingw-runtime-3.7.tar.gz
w32api-3.2.tar.gz
mingw-utils-0.3.tar.gz
gcc-core-3.4.2-20040916-1.tar.gz
diese werden denn zb. nach c:\mingw entpackt
2. qt-win-opensource-desktop-4.0.0-mingw.exe von trolltech laden
3. dieses installieren und bei der installtion der Pfad angeben wo sich mingw befindet.
4. jetzte sollte Qt unter Windows gehen.
Offizell geht nur MinGW.
und dort ist die installtion wie folgt:
1. download der folgenden Pakte von www.mingw.org
binutils-2.15.91-20040904-1.tar.gz
gcc-g++-3.4.2-20040916-1.tar.gz
mingw32-make-3.80.0-3.tar.gz
mingw-runtime-3.7.tar.gz
w32api-3.2.tar.gz
mingw-utils-0.3.tar.gz
gcc-core-3.4.2-20040916-1.tar.gz
diese werden denn zb. nach c:\mingw entpackt
2. qt-win-opensource-desktop-4.0.0-mingw.exe von trolltech laden
3. dieses installieren und bei der installtion der Pfad angeben wo sich mingw befindet.
4. jetzte sollte Qt unter Windows gehen.
Hi Jana,
wie es genau geht kann ich dir auch nicht sagen, da ich es nicht gemacht habe. Zuhause arbeite ich am Mac, mir reicht das Windows in der Firma.
Der Code für das Plugin wird bei der Open Source Version nicht dabei sein, ist ja nicht mal bei der Kommerziellen dabei. Also wirst Du da auch nichts kompilieren können.
Das Plugin macht auch nichts, was man von Hand nicht auch machen könnte. Ist auch gar nicht so verkehrt um zu verstehen, was eigentlich passiert. Es ist also Fummelarbeit angesagt, aber das wohl nur einmal.
wie es genau geht kann ich dir auch nicht sagen, da ich es nicht gemacht habe. Zuhause arbeite ich am Mac, mir reicht das Windows in der Firma.
Der Code für das Plugin wird bei der Open Source Version nicht dabei sein, ist ja nicht mal bei der Kommerziellen dabei. Also wirst Du da auch nichts kompilieren können.
Das Plugin macht auch nichts, was man von Hand nicht auch machen könnte. Ist auch gar nicht so verkehrt um zu verstehen, was eigentlich passiert. Es ist also Fummelarbeit angesagt, aber das wohl nur einmal.
-
kleineSchildy
- Beiträge: 76
- Registriert: 16. September 2004 18:29
- Wohnort: Dresden
Hallo an alle,
danke für eure Hilfe. Nun hat die Installation geklappt
Jetzt brauch ich nurnoch eine kleine Starthilfe
Habe ein kleines Prog
Das möchte ich jetzt compilieren. Leider habe ich soviele Dateien installiert, dass ich nicht wirklich durchsehe, wie ich von meiner cpp-Datei zu einer exe-Datei komme.
Könnt ihr mir da nochmal auf die Sprünge helfen?
Viele Grüße
Jana
danke für eure Hilfe. Nun hat die Installation geklappt
Habe ein kleines Prog
Code: Alles auswählen
#include <QApplication>
#include <QPushButton>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton hello("Hello world!");
hello.resize(100, 30);
hello.show();
return app.exec();
}
Könnt ihr mir da nochmal auf die Sprünge helfen?
Viele Grüße
Jana
-
BartSimpson
- Beiträge: 1379
- Registriert: 6. November 2004 12:03
- Kontaktdaten:
-
kleineSchildy
- Beiträge: 76
- Registriert: 16. September 2004 18:29
- Wohnort: Dresden
Hi,
also in dem Code kann eigentlich kein Fehler sein, weil es das HelloWorld-Programm aus dem Tutorial ist trotzdem wird folgende Naricht angezeigt
Viele Grüße
Jana
also in dem Code kann eigentlich kein Fehler sein, weil es das HelloWorld-Programm aus dem Tutorial ist trotzdem wird folgende Naricht angezeigt
Was hat das zu bedeuten?C:\Dokumente und Einstellungen\Jana\Desktop>qmake -project
C:\Dokumente und Einstellungen\Jana\Desktop>qmake
C:\Dokumente und Einstellungen\Jana\Desktop>make
mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/Dokumente und Einstellungen/Jana/Desktop
'
g++ -c -g -g -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL
-DQT_CORE_LIB -DQT_GUI_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"C:/mingw/inc
lude/QtGui" -I"C:/mingw/include/QtCore" -I"C:/mingw/include" -I"." -I"C:/mingw/i
nclude/ActiveQt" -I"debug" -I"." -I"C:\mingw\mkspecs\win32-g++" -o debug\main.o
main.cpp
main.cpp:13:6: warning: no newline at end of file
g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runt
ime-pseudo-reloc -Wl,-subsystem,windows -o "debug\Desktop.exe" debug\main.o -L"
C:\mingw\lib" -lmingw32 -lqtmaind -lQtCored4 -lQtGuid4
C:\mingw\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot fin
d -lqtmaind
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\Desktop.exe] Error 1
mingw32-make[1]: Leaving directory `C:/Dokumente und Einstellungen/Jana/Desktop'
mingw32-make: *** [debug] Error 2
Viele Grüße
Jana
-
BartSimpson
- Beiträge: 1379
- Registriert: 6. November 2004 12:03
- Kontaktdaten:
-
kleineSchildy
- Beiträge: 76
- Registriert: 16. September 2004 18:29
- Wohnort: Dresden
Hi,
also meine pro-Datei hat folgenden Inhalt:
Ich sehe da nix von release oder debug. Es werden übrigens beide Ordner angelegt.
Viele Grüße
Jana
also meine pro-Datei hat folgenden Inhalt:
######################################################################
# Automatically generated by qmake (2.00a) Mi 20. Jul 21:36:11 2005
######################################################################
TEMPLATE = app
DEPENDPATH += .
INCLUDEPATH += .
# Input
SOURCES += main.cpp
Ich sehe da nix von release oder debug. Es werden übrigens beide Ordner angelegt.
Viele Grüße
Jana
-
BartSimpson
- Beiträge: 1379
- Registriert: 6. November 2004 12:03
- Kontaktdaten:
-
kleineSchildy
- Beiträge: 76
- Registriert: 16. September 2004 18:29
- Wohnort: Dresden