Re: Trouble with wxWindows (XRC and STC linking

From: "Darko Prenosil" <Darko(dot)Prenosil(at)finteh(dot)hr>
To: "Adam H(dot) Pendleton" <fmonkey(at)fmonkey(dot)net>
Cc: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>, <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Trouble with wxWindows (XRC and STC linking
Date: 2003-07-14 17:39:09
Message-ID: 001b01c34a2e$fb6a61f0$0994bfd5@darko
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers


----- Original Message -----
From: "Adam H. Pendleton" <fmonkey(at)fmonkey(dot)net>
To: "Darko Prenosil" <Darko(dot)Prenosil(at)finteh(dot)hr>
Cc: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>; <pgadmin-hackers(at)postgresql(dot)org>
Sent: Tuesday, July 15, 2003 5:36 PM
Subject: Re: [pgadmin-hackers] Trouble with wxWindows (XRC and STC linking

> This new acinclude.m4 file looks fine to me. I'm going to submit a
> cleaner version later this week, but the functionality of the two will
> be the same.
>
> ahp
>
No, it is not OK !!!
I messed up the order of contrib libs and the base wx lib.
It should be first xrc & stc and after that base wx lib (just as for gtk),
otherwise it won't link correctly.
For example:
*libwx_msw-*)
LIBS="$LIBS $WX_NEW_LDFLAGS"
LIBS="$LIBS
${WX_HOME}/lib/libwx_msw_stc-${WX_VERSION}.a
${WX_HOME}/lib/libwx_msw_xrc-${WX_VERSION}.a"
must be:
*libwx_msw-*)
LIBS="$LIBS
${WX_HOME}/lib/libwx_msw_stc-${WX_VERSION}.a
${WX_HOME}/lib/libwx_msw_xrc-${WX_VERSION}.a"
LIBS="$LIBS $WX_NEW_LDFLAGS"

All of those linking errors I mentioned in prev. mails were because of this
error.
(Thanks to Vaclav Slavik from wxWindows list, that helped me to solve this
problem)

Today I finally compiled and linked pgadmin3 with MinGW.

There are few problems left:
1. paths for "make install" in Makefile must be fixed for WIN32 because
of internal directory structure of resource and doc files. (They are not
same for win and *nix)
That should be easy enough.
2. From some reason XRC resources are not loaded at all. I got message
like :
Cannot load resources from file
'D:\MinGW\local\pgadmin3\bin\ui\common\frmVacuum.xrc'.
File is there, but can't be loaded from some reason. I suspect that
this is "slash-backslash" problem with file paths. I'll try to examine it
more closely.
So, for now I can only start pgadmin and see it's main window, but
nothing else.
3. When starting pgadmin, there is that old "command prompt" window,
like it is a "DOS" program.
I have some samples here that are using a whole bunch of additional
compiler flags, but I do not know which one tells to compiler/linker that it
should be a WIN32 program.
I'll try to figure out.
4. I started this whole story, because I wanted to compile pgadmin
without GTK and Microsoft VC, and there is still no easy way to compile
"libpq" with MinGW.
Maybe we can create "branch" for libpq, inside of pgadmin, and
correct the makefiles as we find appropriate. (There is "branch" for whole
wxWindows, libpq is no that big )
The efforts to make "WIN32 port of PostgreSQL", are using MinGW, so
it should be easy enough.
I tried to compile whole PostgreSQL on MinGW and it can be done,
there are known problems with linking (fork - IPC), but build system does
his job well.

I already "wasted" few hours on this, I'm prepared to spend few more, but
don't have much experience with wxWindows and MinGW, so any help is
appreciated.
I think it would be great to compile FREE admin tool for FREE SQL server on
FREE compiler.

Regards !

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Jean-Michel POURE 2003-07-14 19:28:28 Compilation problems under SuSE 8.2
Previous Message Andreas Pflug 2003-07-14 16:38:36 pgadmin/pgsql logo