Sunday, July 20th 2008, 2:38pm UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

21

Wednesday, April 2nd 2008, 3:05pm

But I have mingw, not msvc 2005. Is that the problem?

I saw %qtdir%\plugins\sqldrivers\qsqlpsql4.dll with depends.exe and copied qtsql4.dll and qtcore4.dll to %qtdir%\plugins\sqldrivers, but sqlbrowser doesnt show qpsql.
  • Go to the top of the page

Messenger

Intermediate

Posts: 329

Location: Lt

22

Wednesday, April 2nd 2008, 3:16pm

>>copied qtsql4.dll and qtcore4.dll to
they must be found in one of PATH (application directory is "PATH" too???) environmet variable directories. Plugins directory is not such.


>>But I have mingw, not msvc 2005. Is that the problem?
libpq.dll depends on MSVCR80.DLL (it's msvc 2005 redistributable). You can see it in depends.exe

The dlls search order:
http://msdn2.microsoft.com/en-us/library/ms682586.aspx
Fighting fire with fire.

This post has been edited 1 times, last edit by "Messenger" (Apr 2nd 2008, 3:20pm)

  • Go to the top of the page

23

Wednesday, April 2nd 2008, 3:52pm

QtSql4.dll and QtCore4.dll are in c:\qt\4.3.4\bin originally. I put C:\qt\4.3.4\bin and C:\qt\4.3.4\lib in environment variable.

What application?

Yes...it depends and it is right.

File path in depends.exe -
c:\windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.762_none_10b2f55f9bffb8f8\MSVCR80.DLL

The problem continues...
  • Go to the top of the page

Messenger

Intermediate

Posts: 329

Location: Lt

24

Wednesday, April 2nd 2008, 4:10pm

after changing environment variable you need to rerun applications (console) or even better reboot.

The application which will be runned by double click. The ms dll search algorithm is described in the earlier mentioned page.

What show depends.exe? Are all dlls found (in qt sql plugin directory must be left only qt sql plugins. Delete, move everything exept qt sql plugins related stuff and review the plugin dependencies)? I have two warnings.

Do not forget to remove invalid registry value.
Messenger has attached the following file:
  • psql.jpg (20.23 kB - 227 times downloaded - Last download: Jul 18th 2008, 6:31am)
Fighting fire with fire.
  • Go to the top of the page

25

Wednesday, April 2nd 2008, 4:53pm

C:\psql\bin\libpq.dll, in depends.exe, shows "Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module." and two Modules (.dll) in red: SHLWAPI.DLL and IEFRAME.DLL.

If it possible, say me where each archive must be (what folder)...
what registries I have to remove, etc...
  • Go to the top of the page

Messenger

Intermediate

Posts: 329

Location: Lt

26

Wednesday, April 2nd 2008, 5:00pm

What shows depends.exe when exploring plugins\sqldrivers\qsqlpsql4.dll (in "plugins\sqldrivers\" must be only qt sql plugins stuff other stuff must be deleted or removed)?

Quoted

Try the following
run regedt32 goto "HKEY_CURRENT_USER\Software\Trolltech\OrganizationDefaults\Qt Plugin Cache 4.3.false\C:\qt\plugins\sqldrivers" (the registry key can differ)
and delete psql dll entry.
Rerun sqlbrowser demo.
Fighting fire with fire.
  • Go to the top of the page

27

Wednesday, April 2nd 2008, 5:22pm

C:\qt\plugins\sqldrivers\qsqlpsql4.dll, in depends.exe, shows "Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module." and two Modules (.dll) in red: SHLWAPI.DLL and IEFRAME.DLL.


I delete psql .dll and try...show only qodbc and qsqlite...and .dll come back to the regedt32.

This post has been edited 1 times, last edit by "LoneWolf" (Apr 2nd 2008, 5:25pm)

  • Go to the top of the page

28

Thursday, April 3rd 2008, 2:37pm

Messenger, you tried in Vista and it worked.

Why not do you create a tutorial "How To Install qt with mingw in Windows Vista and integrate psql" ? step by step....

What do you think? ;)

Thanks.
  • Go to the top of the page

Messenger

Intermediate

Posts: 329

Location: Lt

29

Thursday, April 3rd 2008, 4:12pm

I do not think so. My english is horrible and there is nothing to write.

There is helpful resource - http://qtnode.net/wiki?title=Qt4_on_Windows

There is simple steps.

Download and unzip qt. If you unzip it in c:\qt then [qt base] equals c:\qt
Download and unarchive mingw32 packages 3.4.5 core, binutils, g++, runtime, winapi, make etc but no msys.
Download and unarchive postgres win32 binaries package.
Add following directories to PATH environment variable -
[qt base]\bin
[mingw32 base]\bin
[postgres base]\bin
[postgres base]\lib

run new console, issue "echo %PATH%" and verify PATH variable is good.
>cd [qt base]
>configure ...whatever options... -I[postgres base]\include -L[postgres base]\lib -lpq -plugin-sql-psql
>mingw32-make
And do not forget about qt postgres plugin registry value.
Personally I'm finishing this quest because I feel that I will fail to explain more clearly.
Fighting fire with fire.
  • Go to the top of the page

30

Saturday, April 5th 2008, 3:11pm

Thanks for helping Messenger. Im sorry anything...

I did somethings and qpsql appears in sqlbrowser, but when I add connection:

"An error occurred while opening the connection: connection pointer is NULL
QPSQL: Unable to connect"

And dont worry about your english, cause mine is terrible. I am from Brazil.

Somebody know about this ERROR?
  • Go to the top of the page

Messenger

Intermediate

Posts: 329

Location: Lt

31

Saturday, April 5th 2008, 3:40pm

Well, can you connect with same user credencials to server from original postgres console client (psql.exe)?

Postgres server must run.
Database must be created.
User with some rights must be created.
Fighting fire with fire.
  • Go to the top of the page

32

Tuesday, April 8th 2008, 12:56pm

I got it!!! :)

I had to edit qtvars.bat. Put C:\psql\bin and C:\psql\lib.

Thanks everyone!!!
  • Go to the top of the page

Rate this thread