That's not my first programming project at all.
Your post was not that helpful.
I don't know why you are going to do verbal attacks against me.
That's not my first programming project at all.
Your post was not that helpful.
I don't know why you are going to do verbal attacks against me.
I'm not doing any verbal attacks against you. I'm just irritated with "I'm a newbie, be nice and fuzzy and do everything for me" attitude. If you use a tool, any tool, learn what it does before you use it for the first time. Otherwise one day you might be unpleasantly suprised when some tool destroys something important for you.
One of the first sentences in qmake docs says:
This gives you the following information:qmake generates a Makefile based on the information in a project file.
1. qmake is a tool
2. it needs a project file
3. it generates something called a "Makefile"
And then there is two sentences that you have written:
One sentence from the docs can tell you so many things noone had told you before. Maybe it's time to get a bit more familiar with manuals? It's really nothing personal, I have nothing against you just please don't excuse yourself by saying that nobody told you what some tool did.It's my first qt project and noone tells you what qmake and nmake are supposed to do. So I could be that qmake creates the psql.pro...
Here it is blow by blow:
- Open your Windows Start menu
- Locate the "Qt SDK by Nokia (2010.05)" folder
- Open it and select "Qt Command Prompt"
- In the new command prompt everything is correctly set to find the Qt SDK tools (like qmake and mingw32-make). Test by issuing a "qmake -v" command. You should get a Qmake and Qt version number. If you don't get the version message then stop, you won't get any further.
- Locate the Qt source code in the installed Qt SDK. The default location would be something like "C:\qt\2010.05\qt\src" but you will have to use your knowledge of your system to find it. If you cannot find the sources then stop, you won't get any further.
- In the command prompt change directory to the psql driver directory in the Qt source. The command prompt environment has a variable that points to the Qt directory, QTDIR, so this is the quickest way to get there:
Qt Code:
CD %QTDIR% CD src\plugins\sqldrivers\psql qmake "INCLUDEPATH+=C:\pgsql\include" "LIBS+=C:\pgsql\lib\libpq.lib" psql.pro mingw32-makeTo copy to clipboard, switch view to plain text mode
Hey Chris,
thanks for helping me again.
I followed your detailed instructions.
The differences to my last try is, this time I used "Qt command prompt". Last time it was "Windows command prompt". And there was a blank in the installation path of postgresql. I elliminated the blank for plugin building now.
There were no error messages while building the plugin now.
But I haven't understood what to do now to use the plugin.
Okay,
Here in Qt Centre I found this wiki article:
http://www.qtcentre.org/wiki/index.p...ws_using_MinGW
When I compare what I've done with this article, I find the files "qsqlpsql4.dll" and "qsqlpsqld4.dll" in the folder "%QTDIR%\plugins\sqldrivers".
If I load the "qsqlpsql4.dll" with the dependency walker I get the information that there are a few files missing (libpq.dll, mingwm10.dll, libgcc_s_dw2-1.dll, qtcore4.dll, qtsql4.dll).
Tomorrow I'll try to update my enviromental variable paths.
Please tell me if I'm completly wrong.
Greetings
Lot to learn you still have, young padawan. However on the right path you are.
When you started Dependency Walker it was given the default Windows environment PATH, which does not include the Qt bin directories that contain all of the Qt and MingW files listed there. The default environment PATH also does not contain the PostgreSQL binary directory for the PostgreSQL library. Consequently, the Dependency Walker could not load any of these DLLs. If you had launched the Dependency Walker from the "Qt Command Prompt" most of the libraries, except the Postgres ones, would have been found.
You should add the PostgreSQL bin directory to your system PATH. If you develop your program in an environment with the Qt paths set properly such as the Qt Command Prompt or Qt Creator then you should not need to add QT or MingW stuff to the system path. When you deploy you will need to ship the MingW, PostgreSQL and Qt libraries with your application.
Now I added the following paths to the enviroment variable path
But then there are more and more dlls the dependency walker cannot found or with other errorsC:\psql9\bin
C:\qt\2010.05\bin
C:\qt\2010.05\qt\bin
C:\qt\2010.05\mingw\bin
Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: Modules with different CPU types were found.
Just to inform other Newbies who want to connect to PostgreSQL databases as well...
My last-ditch attempt was, just don't care about what the results of the dependency walker are and copied ALL dlls of %postgresdir%\bin.
Now I can load the QPSQL Driver and connect to my postgresql database.
At this point I want to thank the experts of this forum again for trying to help me.
Greetz, wsw
Last edited by WilliamSpiderWeb; 19th March 2011 at 00:09.
Bookmarks