Page 1 of 1

wxDba - compilation

Posted: Sat Sep 10, 2011 5:16 am
by msn92
Hello everyone!

I've started using wxWidgets recently and I love it! Especially the gui part.

I wanted to try writing a db application with wxWidgets. Read about wxODBC, it turns out to be outdated - it's been removed from the project. So I looked for the alternatives. wxDba seems to be a good candidate. So I tried to compile it. The wxDba dir has a visualStudio solution file. So I tried vs to compile it because it seemed easier. But I got compilation errors: most of them state that it could not find the required include file.
"wx/setup.h" goes many times on the list. And also there are some files from "dba/" directory.

I checked the search directories of the solution: it includes %WXWIN%, %DEVEL%, %ICONV%,%LIBXML2%
I've set the first two of them:
%WXWIN% - path to wxWidgets directory
%DEVEL% - path to debea folder (is it right?)
I don't have idea about the other two : %ICONV%, %LIBXML2%

Please guide me to the right way of compiling wxDba.
It doesn't have to be "Visual Studio way". I'm ready to use other compilers, but please explain it to me step-by-step.
PS:I use CodeBlocks for my wxWidgets projects.

Re: wxDba - compilation

Posted: Sat Sep 10, 2011 3:33 pm
by msn92
Ok, I tried compiling with mingw now:

In cmd I wrote:
cd /D <path to wxDba folder>
mingw32-make -f makefile.gcc DEBUG=0

The compiler gave error stating it couldn't find include files: many files from "wx" dir:
wx/wx.h
wx/datetime.h
...

To fix this: I tried adding the path to wxwidgets include folder to Environment variables. But no difference.
Also tried adding -i <%WXWIN%/include>:
mingw32-make -I <path2wxwidgets>/include -f makefile.gcc DEBUG=0

Still getting errors. btw, there are some files from dba folder too that the compiler is not being able to find...

Please help me to compile it!
Thanks in advance

Re: wxDba - compilation

Posted: Sat Sep 10, 2011 6:43 pm
by msn92
Update: I succeeded to compile the wxDba lib with VisualStudio.

Some work on environment variables and search directories and it worked. ;)

I would be happy if someone posted an usage example :)

PS: Moderators please mark the topic as "Solved" as I couldn't figure out how to do it.

Re: wxDba - compilation

Posted: Tue Sep 13, 2011 1:37 am
by samsam598
If there is a successful build with MinGW under windows,please share the steps with many thanks.

Re: wxDba - compilation

Posted: Tue Sep 27, 2011 6:13 am
by blacklumber
Схема очевидно такова(сборку лучше всего проводить в среде MSYS):
1 Собираем Dba
2 Собираем wxDba
==================================
All operation better perfome in env MSYS:
Unpack Dba package
Enter to the folder something like that: dba-1.4.2 (this folder after compilation must contains dba-config script!)
Type : ./configure
Then: make
After building dba package, unpack wxDba
Enter to the folder wxdba-1.4.2, type:
./configure --with-wx-config=/path/to/wxWidgets/wx-config --with-dba-config=/path/to/dba-config
Before do make binary, we should spec. CPPFLAGS in Makefile to: CPPFLAGS=-I/path/to/dba
Then:make

Re: wxDba - compilation

Posted: Thu Oct 06, 2011 6:06 am
by samsam598
Thank you for the sharing.