Seite 1 von 1

Qt 3.2.1 MySQl und Borland Compiler unter Windows

Verfasst: 16. Januar 2007 11:39
von leenas
Hallo alle zusammen,

Im Rahmen meiner Studienarbeit soll ich eine Oberfläche mit QT-Schreiben. Bin also absoluter Neuling, was Qt betrifft.
Ich hoffe ihr könnt mir helfen!

Ich habe MySQL Srver 5.0 heruntergeladen und versuche nun QT beizubringen, daß ich doch bitte eine MYSQL Datenbank verwenden möchte.

In der Doku von Qt 3.2.1 steht drin:

Code: Alles auswählen

cd %QTDIR%\plugins\src\sqldrivers\mysql
qmake -o Makefile "INCLUDEPATH+=C:\MYSQL\INCLUDE" "LIBS+=C:\MYSQL\LIB\OPT\LIBMYSQL.LIB" mysql.pro
das habe ich dann auch brav eingetippt :

Code: Alles auswählen

C:\Qt\3.2.1\plugins\src\sqldrivers\mysql>qmake -o Makefile "INCLUDEPATH+=\"C:\Pr
ogramme\MySQL\MySQL Server 5.0\include\"" ""LIBS+=\"C:\Programme\MySQL\MySQL Ser
ver 5.0\lib\opt\libmysql.lib"" mysql.pro
Dann kam leider nur als Antwort:

Code: Alles auswählen

Error processing project file: C:/Qt/3.2.1/plugins/src/sqldrivers/mysql/Server
Cannot find directory: C:\Qt\3.2.1\plugins\src\sqldrivers\mysql\5.0\lib\opt
Error processing project file: C:/Qt/3.2.1/plugins/src/sqldrivers/mysql/5.0/lib/
opt/libmysql.lib
Error processing project file: C:/Qt/3.2.1/plugins/src/sqldrivers/mysql/mysql.pr
o


Kann mir bitte jemand helfen? Ich weiß echt nicht mehr weiter! :?

Vielen Dank!!!!!

Verfasst: 16. Januar 2007 13:16
von Christian81
Abgesehen davon ob ich nicht weiss ob das ganze wirklich funktioniert dürfen im Pfad keine Leerzeichen sein. Das kann qmake in dieser Version noch nicht ab.

Verfasst: 16. Januar 2007 13:48
von BartSimpson
Wieso nimmst du nicht Qt4??

Verfasst: 17. Januar 2007 13:16
von leenas
habe bereits schon im Forum etwas nachgeschaut und gesehen, daß der Vorschlag schon mit 2 Anführungszeichen kam

Code: Alles auswählen

"INCLUDEPATH+=\"C:\Pr
ogramme\MySQL\MySQL Server 5.0\include\"" 
das habe ich ja schon berücksichtigt.

Daran kann es also nicht liegen.


Wieso nimmst du nicht Qt4??
Das Vorbild der Studienarbeit ist mit einem Borland Compiler geschrieben, d.h. ich mußte auch notgedrungen einen Borland nehmen.
Allerdings weiß ich bis heute nicht ob Qt4 mit einem Borland Compiler unter Windows zurecht kommt.
[/quote]

Verfasst: 17. Januar 2007 13:22
von Christian81
Nenn doch einfach den Pfad um ...

Verfasst: 17. Januar 2007 13:34
von leenas
Jetzt habe ich den Pfad erfolgreich ändern können.
Allerdings sagt mir qmake, daß ich seine Anweisung nicht richtig verwende.

Code: Alles auswählen


C:\Qt\3.2.1\plugins\src\sqldrivers\mysql>qmake -o Makefile "INCLUDEPATH+=C:\Programme\MySQL\MySQLServer5\include\" "LIBS+=C:\Programme\MySQL\MySQLServer5\opt\li
bmysql.lib" mysql.pro
Usage: C:\Qt\3.2.1\bin\qmake.exe [mode] [options] [files]

   QMake has two modes, one mode for generating project files based on
some heuristics, and the other for generating makefiles. Normally you
shouldn't need to specify a mode, as makefile generation is the default
mode for qmake, but you may use this to test qmake on an existing project

Mode:
        -project       Put qmake into project file generation mode
                       In this mode qmake interprets files as files to
                       be built,
                       defaults to *.c; *.ui; *.y; *.l; *.ts; *.h; *.hpp; *.hh;
*.H; *.hxx; *.cpp; *.cc; *.cxx; *.C
        -makefile      Put qmake into makefile generation mode (default)
                       In this mode qmake interprets files as project files to
                       be processed, if skipped qmake will try to find a project

                       file in your current working directory

Warnings Options:
        -Wnone         Turn off all warnings
        -Wall          Turn on all warnings
        -Wparser       Turn on parser warnings
        -Wlogic        Turn on logic warnings

Options:
         * You can place any variable assignment in options and it will be     *

         * processed as if it was in [files]. These assignments will be parsed *

         * before [files].                                                     *

        -o file        Write output to file
        -unix          Run in unix mode
        -win32         Run in win32 mode
        -macx          Run in Mac OS X mode
        -d             Increase debug level
        -t templ       Overrides TEMPLATE as templ
        -tp prefix     Overrides TEMPLATE so that prefix is prefixed into the va
lue
        -help          This help
        -v             Version information
        -after         All variable assignments after this will be
                       parsed after [files]
        -cache file    Use file as cache           [makefile mode only]
        -spec spec     Use spec as QMAKESPEC       [makefile mode only]
        -nocache       Don't use a cache file      [makefile mode only]
        -nodepend      Don't generate dependencies [makefile mode only]
        -nomoc         Don't generate moc targets  [makefile mode only]
        -nopwd         Don't look for files in pwd [ project mode only]
        -norecursive   Don't do a recursive search [ project mode only]

C:\Qt\3.2.1\plugins\src\sqldrivers\mysql>
Was ist jetzt daran falsch?