Compiling DatabaseLayer with Postgresql support on Windows.

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
mrdebug
Earned some good credits
Earned some good credits
Posts: 131
Joined: Mon Jul 17, 2006 4:57 pm

Compiling DatabaseLayer with Postgresql support on Windows.

Post by mrdebug »

I try this:

Code: Select all

mingw32-make -f makefile.gcc WXWIN=C:\wxWidgets-2.8.9 postgresql
but I obtain:

Code: Select all

C:\Documents and Settings\Denis\Desktop\databaselayer_src_1.7.1.tar\databaselaye
r\build>mingw32-make -f makefile.gcc WXWIN=C:\wxWidgets-2.8.9 postgresql
if not exist ..\lib\gcc_lib mkdir ..\lib\gcc_lib
g++ -c -o gccmswud\databaselayer_postgresql_lib_DatabaseLayer.o -DHAVE_W32API_H
-D_UNICODE -D__WXDEBUG__ -D__WXMSW__ -IC:\wxWidgets-2.8.9\lib\gcc_lib\mswud -IC:
\wxWidgets-2.8.9\include -O0 -g -I..\include -I. -I.\include   -MTgccmswud\datab
aselayer_postgresql_lib_DatabaseLayer.o -MFgccmswud\databaselayer_postgresql_lib
_DatabaseLayer.o.d -MD ../src/DatabaseLayer.cpp
g++ -c -o gccmswud\databaselayer_postgresql_lib_DatabaseResultSet.o -DHAVE_W32AP
I_H -D_UNICODE -D__WXDEBUG__ -D__WXMSW__ -IC:\wxWidgets-2.8.9\lib\gcc_lib\mswud
-IC:\wxWidgets-2.8.9\include -O0 -g -I..\include -I. -I.\include   -MTgccmswud\d
atabaselayer_postgresql_lib_DatabaseResultSet.o -MFgccmswud\databaselayer_postgr
esql_lib_DatabaseResultSet.o.d -MD ../src/DatabaseResultSet.cpp
g++ -c -o gccmswud\databaselayer_postgresql_lib_PreparedStatement.o -DHAVE_W32AP
I_H -D_UNICODE -D__WXDEBUG__ -D__WXMSW__ -IC:\wxWidgets-2.8.9\lib\gcc_lib\mswud
-IC:\wxWidgets-2.8.9\include -O0 -g -I..\include -I. -I.\include   -MTgccmswud\d
atabaselayer_postgresql_lib_PreparedStatement.o -MFgccmswud\databaselayer_postgr
esql_lib_PreparedStatement.o.d -MD ../src/PreparedStatement.cpp
g++ -c -o gccmswud\databaselayer_postgresql_lib_DatabaseErrorReporter.o -DHAVE_W
32API_H -D_UNICODE -D__WXDEBUG__ -D__WXMSW__ -IC:\wxWidgets-2.8.9\lib\gcc_lib\ms
wud -IC:\wxWidgets-2.8.9\include -O0 -g -I..\include -I. -I.\include   -MTgccmsw
ud\databaselayer_postgresql_lib_DatabaseErrorReporter.o -MFgccmswud\databaselaye
r_postgresql_lib_DatabaseErrorReporter.o.d -MD ../src/DatabaseErrorReporter.cpp
g++ -c -o gccmswud\databaselayer_postgresql_lib_DatabaseStringConverter.o -DHAVE
_W32API_H -D_UNICODE -D__WXDEBUG__ -D__WXMSW__ -IC:\wxWidgets-2.8.9\lib\gcc_lib\
mswud -IC:\wxWidgets-2.8.9\include -O0 -g -I..\include -I. -I.\include   -MTgccm
swud\databaselayer_postgresql_lib_DatabaseStringConverter.o -MFgccmswud\database
layer_postgresql_lib_DatabaseStringConverter.o.d -MD ../src/DatabaseStringConver
ter.cpp
g++ -c -o gccmswud\databaselayer_postgresql_lib_DatabaseQueryParser.o -DHAVE_W32
API_H -D_UNICODE -D__WXDEBUG__ -D__WXMSW__ -IC:\wxWidgets-2.8.9\lib\gcc_lib\mswu
d -IC:\wxWidgets-2.8.9\include -O0 -g -I..\include -I. -I.\include   -MTgccmswud
\databaselayer_postgresql_lib_DatabaseQueryParser.o -MFgccmswud\databaselayer_po
stgresql_lib_DatabaseQueryParser.o.d -MD ../src/DatabaseQueryParser.cpp
g++ -c -o gccmswud\databaselayer_postgresql_lib_PostgresPreparedStatementWrapper
.o -DHAVE_W32API_H -D_UNICODE -D__WXDEBUG__ -D__WXMSW__ -IC:\wxWidgets-2.8.9\lib
\gcc_lib\mswud -IC:\wxWidgets-2.8.9\include -O0 -g -I..\include -I. -I.\include
  -MTgccmswud\databaselayer_postgresql_lib_PostgresPreparedStatementWrapper.o -M
Fgccmswud\databaselayer_postgresql_lib_PostgresPreparedStatementWrapper.o.d -MD
../src/PostgresPreparedStatementWrapper.cpp
In file included from ../src/PostgresPreparedStatementWrapper.cpp:1:
../src/../include/PostgresPreparedStatementWrapper.h:15:22: libpq-fe.h: No such
file or directory
What can I do?
jb_coder
Super wx Problem Solver
Super wx Problem Solver
Posts: 267
Joined: Mon Oct 18, 2004 10:55 am

Post by jb_coder »

Have you installed the postgresql development packages which should include the header and library files?
mrdebug
Earned some good credits
Earned some good credits
Posts: 131
Joined: Mon Jul 17, 2006 4:57 pm

Post by mrdebug »

I think no. What is the right website to downloads it?

Sorry for my bad english.
rodrigod
I live to help wx-kind
I live to help wx-kind
Posts: 172
Joined: Thu Jun 26, 2008 8:50 pm

Post by rodrigod »

I think it comes on the postgreSQL installer. Just run it again and only intall the developer libraries. And you will have to the headers and dll to your application folder.

Now I have a question also, do i need to copy all the postgresql dll's to my appliction's folder or is there any way to use them from their original path?

Thanks
jb_coder
Super wx Problem Solver
Super wx Problem Solver
Posts: 267
Joined: Mon Oct 18, 2004 10:55 am

Post by jb_coder »

You need to have the Postgres DLL's somewhere in your library path. This safest way to do that is to put them alongside your executable. It is possible to put them in the WINDOWS\System directory also to achieve this, but I think MS frowns on that.

Here are some links that might be helpful determining how to add more paths to the DLL search path:

http://en.wikipedia.org/wiki/Dynamic-link_library
http://msdn.microsoft.com/en-us/library/ms682586.aspx
Post Reply