I'm sorry but I can't!!
I did a search in my windows to find this dll, but the search finished with no results!!
I'm sorry but I can't!!
I did a search in my windows to find this dll, but the search finished with no results!!
Which psql package did you install? Perhaps it's a development package you have to build yourself. However, there are binary packages available for sure too.
J-P Nurmi
This is the postgre I installed:
ftp://ftp2.br.postgresql.org/postgre.../v8.2.4/win32/
The page is:
http://www.postgresql.org.br/Downloads
Last edited by brevleq; 8th December 2007 at 15:23. Reason: updated contents
Well, then the libpq should be located in postgresql's bin folder. I just sent you my libpq, though. I do not guarantee for it to work now, though.
"If you lie to the compiler, it will get its revenge." - Henry Spencer
huahuahua
I looked to my psql directory again and the libpq was here!!
Now I have another problem!! When I try to run my program the windows retuns this error:
[HTML]Runtime Error!
Program: C:\caixa_xpress\release\caixa_xpress.exe
R6034
An application has made an attempt to load the C runtime Library incorrectly.
Please contact the application's support team for more information.
[/HTML]
I'm putting a lot of dlls in my release directory, the mingw isn't linking the dlls? I believe its not necessary put all these dlls in my folder!! I'm wrong?
I'm here again!!
At this time I tryied:
C:\Qt\4.3.2> configure -release -qt-sql-psql -plugin-sql-psql -I C:\psql\include
-L C:\psql\lib\ms
and then make:
mingw32-make[4]: Entering directory `C:/Qt/4.3.2/src/plugins/sqldrivers/psql'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
oc -Wl,-s -mthreads -Wl -shared -Wl,--out-implib,c:\Qt\4.3.2\plugins\sqldrivers\
libqsqlpsql4.a -o "..\..\..\..\plugins\sqldrivers\qsqlpsql4.dll" tmp\obj\release
_shared\main.o tmp\obj\release_shared\qsql_psql.o tmp\obj\release_shared\moc_qsq
l_psql.o -L"c:\Qt\4.3.2\lib" -L"c:\Qt\4.3.2\lib" tmp\obj\release_shared\qsqlpsq
l_resource_res.o -LC:\psql\lib\ms -lpq -lws2_32 -ladvapi32 -lQtSql4 -lQtCore4
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\ mingw32\bin\ld.exe: cannot fin
d -lpq
collect2: ld returned 1 exit status
mingw32-make[4]: *** [..\..\..\..\plugins\sqldrivers\qsqlpsql4.dll] Error 1
mingw32-make[4]: Leaving directory `C:/Qt/4.3.2/src/plugins/sqldrivers/psql'
mingw32-make[3]: *** [release] Error 2
mingw32-make[3]: Leaving directory `C:/Qt/4.3.2/src/plugins/sqldrivers/psql'
mingw32-make[2]: *** [sub-psql-make_default] Error 2
mingw32-make[2]: Leaving directory `C:/Qt/4.3.2/src/plugins/sqldrivers'
mingw32-make[1]: *** [sub-sqldrivers-make_default] Error 2
mingw32-make[1]: Leaving directory `C:/Qt/4.3.2/src/plugins'
mingw32-make: *** [sub-plugins-make_default-ordered] Error 2
Why this error is appearing?
What does C:\psql\lib\ms contain?
J-P Nurmi
I'm going to make a wild guess and probably make a fool of myself, but here we go... That ms in C:\psql\lib\ms makes me think of MSVC, but you're compiling with MinGW. I don't think you can use MSVC compiled libs with MinGW without applying some magic first.
C:\psql\lib seems to contain the MinGW compiled libs, so use those instead. Try:
configure -release -qt-sql-psql -I C:\psql\include -L C:\psql\lib
I did it and my program works well now!!
The conection with DB is ok!!
Thanks for all that helped me!!
Bookmarks