Qt@C++: DLLs, SOs und noch mehr Probleme

Wenn ich ein beliebiges von mir geschriebenes C++-Programm, welches Qt verwendet, unter Linux oder unter Windows XP kompiliere und auf einem anderen Rechner ohne installiertem Qt inkl. Compuler ausführen will, werde ich mit Fehlern überschüttet.

Unter Windows fehlt zuallererst die mingwm10.dll. Mit Modifikationen per Hand im Makefile habe ich es schon geschafft, die abzustellen. Aber dann fehlt die QtCore4.dll und so weiter. Unter Linux sieht es ähnlich aus, blos sind es halt *.so-Dateien, die fehlen.
Wenn ich jetzt unter Windows - wie Onkel Google empfahl - im Qt-Ordner nochmal "configure -static" ausführe, rattern Zeilen über den Bildschirm bis irgendwann "building qmake failed" oder ähnliches ausgespuckt wird. Klasse!

Aber Opera verwendet laut Wikipedia doch auch Qt und der sendet besagte Bibliotheken auch nicht mit. Was kann ich tun?
 
Du kannst die Bibliotheken statisch in dein Programm linken.

Wenn ich jetzt unter Windows - wie Onkel Google empfahl - im Qt-Ordner nochmal "configure -static" ausführe, rattern Zeilen über den Bildschirm bis irgendwann "building qmake failed" oder ähnliches ausgespuckt wird. Klasse!
Solange du uns nicht verrätst an welcher Stelle der Fehler auftritt und was vor der failed-Nachricht steht, wird dir kaum jemand sagen können, was dort schief geht.
 
Original von bitmuncher
Du kannst die Bibliotheken statisch in dein Programm linken.

Wenn ich jetzt unter Windows - wie Onkel Google empfahl - im Qt-Ordner nochmal "configure -static" ausführe, rattern Zeilen über den Bildschirm bis irgendwann "building qmake failed" oder ähnliches ausgespuckt wird. Klasse!
Solange du uns nicht verrätst an welcher Stelle der Fehler auftritt und was vor der failed-Nachricht steht, wird dir kaum jemand sagen können, was dort schief geht.
Konnte ich grad nicht, weil ich den Post unter Linux geschrieben hatte und jetzt gerade - wieder unter Windows - Qt schnell neuinstalliere und dann nochmal versuche static zu "configure"-n. *aufdownloadwart*

Edit: Ok, hier die Konsolenausgabe (win):
Code:
C:\Qt\4.4.3\qt>configure -static -no-sql-oci -no-sql-psql -no-sql-oci -no-sql-od
bc -no-sql-tds -no-sql-db2 -no-sql-ibase -no-style-motif -no-style-cde -no-style
-windowsce -no-style-windowsmobile

This is the Qt for Windows Open Source Edition.

You are licensed to use this software under the terms of
the GNU Lesser Public License (LGPL) version 2.1 or GNU General Public License (
GPL) version 3.

Type 'L' to view the GNU Lesser General Public License version 2.1 (LGPLv2.1).
Type '3' to view the GNU General Public License version 3 (GPLv3).
Type 'y' to accept this license offer.
Type 'n' to decline this license offer.

Do you accept the terms of the license?
y
Setting Direct3D to NO, since the proper Direct3D SDK was not detected.
Make sure you have the Direct3D SDK installed, and that you have run
the <path to SDK>\Utilities\Bin\dx_setenv.cmd script.
The D3D SDK library path *needs* to appear before the Platform SDK library
path in your LIB environment variable.
All the required DirectShow/Direct3D files couldn't be found.
Make sure you have either the platform SDK AND the DirectX SDK or the Windows SD
K installed.
If you have the DirectX SDK installed, please make sure that you have run the <p
ath to SDK>\SetEnv.Cmd script.
Environment:
    INCLUDE=
      Unset
    LIB=
      Unset
    PATH=
      C:\WINDOWS\system32
      C:\WINDOWS
      C:\WINDOWS\System32\Wbem
      C:\Qt\4.4.3\bin
      C:\MinGW\bin
      (...)
You are licensed to use this software under the terms of the GNU LGPL version 2.
1 or the GNU GPL version 3.
See C:/Qt/4.4.3/qt/LICENSE.LGPL
 or C:/Qt/4.4.3/qt/LICENSE.GPL3

Configuration:
    dist-config
    large-config
    medium-config
    minimal-config
    small-config
    full-config
    build_all
    debug
Qt Configuration:
    release
    debug
    zlib
    gif
    png
    accessibility
    qt3support
    opengl
    ipv6
    scripttools
    xmlpatterns
    webkit
    svg
    minimal-config
    small-config
    medium-config
    large-config
    full-config

QMAKESPEC...................win32-g++ (detected)
Architecture................windows
Maketool....................mingw32-make
Debug symbols...............yes
Accessibility support.......yes
STL support.................yes
Exception support...........yes
RTTI support................yes
MMX support.................no
3DNOW support...............no
SSE support.................no
SSE2 support................no
IWMMXT support..............no
OpenGL support..............yes
Direct3D support............no
OpenSSL support.............no
QtDBus support..............no
QtXmlPatterns support.......yes
Phonon support..............no
WebKit support..............yes
QtScriptTools support.......yes
Graphics System.............raster
Qt3 compatibility...........yes

Third Party Libraries:
    ZLIB support............qt
    GIF support.............yes
    TIFF support............plugin
    JPEG support............plugin
    PNG support.............qt
    MNG support.............plugin

Styles:
    Windows.................yes
    Windows XP..............yes
    Windows Vista...........yes
    Plastique...............yes
    Cleanlooks..............yes
    Motif...................no
    CDE.....................no
    Windows CE..............no
    Windows Mobile..........no

Sql Drivers:
    ODBC....................no
    MySQL...................no
    OCI.....................no
    PostgreSQL..............no
    TDS.....................no
    DB2.....................no
    SQLite..................plugin (qt)
    SQLite2.................no
    InterBase...............no

Sources are in..............C:\Qt\4.4.3\qt
Build is done in............C:\Qt\4.4.3\qt
Install prefix..............C:\Qt\4.4.3\qt
Headers installed to........C:/Qt/4.4.3/qt/include
Libraries installed to......C:/Qt/4.4.3/qt/lib
Plugins installed to........C:/Qt/4.4.3/qt/plugins
Binaries installed to.......C:/Qt/4.4.3/qt/bin
Docs installed to...........C:/Qt/4.4.3/qt/doc
Data installed to...........C:/Qt/4.4.3/qt
Translations installed to...C:/Qt/4.4.3/qt/translations
Examples installed to.......C:/Qt/4.4.3/qt/examples
Demos installed to..........C:/Qt/4.4.3/qt/demos

WARNING: Using static linking will disable the use of plugins.
         Make sure you compile ALL needed modules into the library.
Creating qmake...
g++ -c -oqconfig.o -O -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Ige
nerators/mac -IC:\Qt\4.4.3\qt/include -IC:\Qt\4.4.3\qt/include/QtCore -IC:\Qt\4.
4.3\qt/include -IC:\Qt\4.4.3\qt/include/QtCore -IC:\Qt\4.4.3\qt/src/corelib/glob
al -IC:\Qt\4.4.3\qt/include/QtScript -IC:\Qt\4.4.3\qt/mkspecs/win32-g++ -DQT_NO_
TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_PCRE -DQT_NODLL -DQT
_NO_STL -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUILD_QMAKE -DQT_NO_T
HREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQMAKE_OPENSOURCE
_EDITION C:\Qt\4.4.3\qt/src/corelib/global/qconfig.cpp
g++  -o qmake.exe project.o main.o makefile.o unixmake.o unixmake2.o mingw_make.
o option.o winmakefile.o projectgenerator.o property.o meta.o makefiledeps.o met
amakefile.o xmloutput.o pbuilder_pbx.o borland_bmake.o msvc_nmake.o msvc_dsp.o m
svc_vcproj.o msvc_objectmodel.o qbitarray.o qbuffer.o qbytearray.o qcryptographi
chash.o qvsnprintf.o qbytearraymatcher.o qconfig.o qdatetime.o qdir.o qdiriterat
or.o qfile.o qtemporaryfile.o qfileinfo.o qabstractfileengine.o qfsfileengine.o
qfsfileengine_iterator.o qfsfileengine_win.o qfsfileengine_iterator_win.o qgloba
l.o qhash.o qiodevice.o qlibraryinfo.o qlistdata.o qlinkedlist.o qlocale.o qmall
oc.o qmap.o qregexp.o qstring.o qstringlist.o qtextstream.o quuid.o qvector.o qu
rl.o qsettings.o qsettings_win.o qvariant.o qmetatype.o qnumeric.o qscriptasm.o
qscriptast.o qscriptastvisitor.o qscriptcompiler.o qscriptecmaarray.o qscriptecm
aboolean.o qscriptecmacore.o qscriptecmadate.o qscriptecmafunction.o qscriptecma
global.o qscriptecmamath.o qscriptecmanumber.o qscriptecmaobject.o qscriptecmare
gexp.o qscriptecmastring.o qscriptecmaerror.o qscriptcontext_p.o qscriptengine.o
 qscriptengine_p.o qscriptengineagent.o qscriptextenumeration.o qscriptextvarian
t.o qscriptcontext.o qscriptcontextinfo.o qscriptfunction.o qscriptgrammar.o qsc
riptlexer.o qscriptclassdata.o qscriptparser.o qscriptprettypretty.o qscriptsynt
axchecker.o qscriptclass.o qscriptclasspropertyiterator.o qscriptstring.o qscrip
tvalue.o qscriptvalueimpl.o qscriptvalueiterator.o qscriptvalueiteratorimpl.o -l
ole32 -luuid
cp qmake.exe C:\Qt\4.4.3\qt/bin/qmake.exe
Creating makefiles in src...
Generating Makefiles...
Could not find mkspecs for your QMAKESPEC(win32-g++) after trying:
        C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_cre
ate_more/Troll/4.5.0/qt\mkspecs
Error processing project file: C:/Qt/4.4.3/qt/projects.pro
Qmake failed, return code 3

Edit #2: Mit C:\Qt\4.4.3\qt>configure -static -no-sql-oci -no-sql-psql -no-sql-oci -no-sql-od bc -no-sql-tds -no-sql-db2 -no-sql-ibase -no-style-motif -no-style-cde -no-style -windowsce -no-style-windowsmobile -fast kommen gefühlte 3 Millionen Zeilen Antwort, aber kein Fehler.

Edit #3: Will ich irgendwo "qmake" ausführen, kommt das hier:
Code:
C:\cpp\test1\Test>qmake
Could not find mkspecs for your QMAKESPEC(win32-g++) after trying:
        C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_create_more/Troll/4.5.0/qt\mkspecs
Error processing project file: C:/cpp/test1/Test/Test.pro

Edit #4: Vergesst Edit 2 und 3. War eh nicht richtig statisch kompiliert. Laut einem Tutorial brauche ich C:\Qt\4.4.3\qt>configure -static -release -no-exceptions -qt-sql-odbc -qt-sql-mysql -qt-sql-sqlite -qt-gif -qt-libpng -qt-libjpeg -qt-libtiff -no-vcproj, was wieder den Fehler von Edit#1 ganz oben aufwirft.
 
Gib mal beim qmake explizit die Spec an.

qmake -spec win32-xxx

xxx musst du durch den von dir verwendeten Compiler ersetzen.
 
Code:
C:\cpp\test1\Test>qmake -spec win32-g++
Could not find mkspecs for your QMAKESPEC(win32-g++) after trying:
        C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_cre
ate_more/Troll/4.5.0/qt\mkspecs
Error processing project file: C:/cpp/test1/Test/Test.pro
Bringt nix.
 
Ich habe exaxt das gleiche Problem!
Und weiß auch net was machen, hab auch schon einiges probiert.
Aber den in der Fehlermeldung:
Code:
Could not find mkspecs for your QMAKESPEC(win32-g++) after trying:
        C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_create_more/Troll/4.5.0/qt\mkspecs
genannten Ordner gibt es bei mir auch nicht, die mkspecs liegen in meinem qt ordner wo ich es installiert habe! Weiß vielleicht jemand eine möglichkeit
configure zu übergeben wo es nach den mkspecs suchen soll...?

mfg virus
 
Zurück
Oben