Re: Gtk-Perl on cygwin?



 Michael,

2002-01-08 11:00:46, du schriebst:

At 08:53 PM 06/01/02 +0100, Gerrit P. Haase wrote:
I looked at your site:
expat 1.95.0 (versions 1.95.1 and 1.95.2 don't seem to work)
That is not correct, expat-1.95.2 builds with a little patch with
shared libs.  I posted a patch at the expat sourceforge bug tracker.

Thanks!  I will look up your patch and try again.

BTW, I used the latest libtool to build expat-1.95.2, but try to fetch
to patched version from Chuck Wilsons Cygutils-Site, since it seems to
be down, try here:
ftp://ftp.uni-erlangen.de/pub/pc/gnuwin32/cygwin/porters/Wilson_Charles_S/testing/
Note, the autotools automake, autoconf there are already in the latest
Cygwin netrelease included. You need only all the libtool stuff.


XML::Parser version 2.29 (version 2.30 does not work)
What is the problem with XML::Parser 2.30?

"Win32 error 126" during the tests, indicating that the system can't load
blib/arch/auto/XML/Parser/Expat/Expat.dll.  

http://sourceforge.net/tracker/download.php?group_id=10127&atid=310127&file_id=12434&aid=474548

I think I was led to try an older version of XML::Parser because of this
message:

    http://sources.redhat.com/ml/cygwin/2001-07/msg01105.html

Quoted:
Firstly you need to build expat.
http://prdownloads.sourceforge.net/expat/expat-1.95.0.tar.gz

Presently I have had no joy with 1.95.1 and don't have the time right now to
port properly. A few hacks are required but nothing too dificult.

Once this is installed you will need to create a symlink libexpat.dll to
libexpat-0-0-0.dll.

Symlinks to dll's are not working!


However, the problem with 2.30 may be the same one that you patched with xpat.

No, XML::Parser 2.30 builds OOTB for me and passes all tests with
expat 1.95.2 shared.

Thanks also for your note about not being able to build Win32 DLLs with
undefined symbols.  I don't have any real experience in building things
under Cygwin - if you've got any ideas on the dll issue, please let me know!

I did have some luck changing "extern" declarations to
"__declspec(dllimport) extern".  But then, instead of build time errors, I
got runtime errors.  And then I got busy with other things.  I'll try to
look at it again in the next day or so...

If you use the latest binutils which comes with cygwin there is little
need to mask this way, the functions are exported and automatically
imported, not so with constants or macros, say: const char FOO_VERSION;
needs to be decorated in the Headers when compiling code which will be
linked against the dll's.  The problem is that you cannot mask the
macros and constants when building the dll.
Usually there is used something like this which I used for GTK+:

#ifndef GDK_IMPORT
#if (defined(_WIN32) || defined(__CYGWIN__)) && !(defined(GDK_BUILD_DLL) || defined(GDK_STATIC))
#define GDK_IMPORT __declspec(dllimport)
#else
#define GDK_IMPORT
#endif
#endif

Now if you build the dll you need to declare GDK_BUILD_DLL, to build a
static lib declare GDK_STATIC, if you compile and link against the dll
you need to declare nothing if you link against the static lib declare
GDK_STATIC.

Now you can mask every prototype, macro, function like this:

-extern gchar           *gdk_input_gxid_host;
-extern gint             gdk_input_gxid_port;
-extern gint             gdk_input_ignore_core;
+extern GDK_IMPORT gchar           *gdk_input_gxid_host;
+extern GDK_IMPORT gint             gdk_input_gxid_port;
+extern GDK_IMPORT gint             gdk_input_ignore_core;

 /* Gtk version.
  */
-extern const guint gtk_major_version;
-extern const guint gtk_minor_version;
-extern const guint gtk_micro_version;
-extern const guint gtk_binary_age;
-extern const guint gtk_interface_age;
+extern GTK_IMPORT const guint gtk_major_version;
+extern GTK_IMPORT const guint gtk_minor_version;
+extern GTK_IMPORT const guint gtk_micro_version;
+extern GTK_IMPORT const guint gtk_binary_age;
+extern GTK_IMPORT const guint gtk_interface_age;
 gchar* gtk_check_version (guint        required_major,
                          guint required_minor,
                          guint required_micro);

I have attached the full GTK and GLIB plus Imlib plus several other
patches here because it is nice to have this all shared;)

Only piece missing here is a shared version of gnome-libs:(
and the much more difficult to build shared libORBit!

There is also pkgconfig needed and in this audiofile version is
no *.pc file included, so this needs to be created manually else
pkgconfig fails detecting the libs.
I haven't tried the latest audiofile (0.23) yet.

Also to get this all shared a shared version of db-4.0 is nice:)
Not to mention libiconv which is available here:
ftp://ftp.uni-erlangen.de/pub/pc/gnuwin32/cygwin/porters/Wilson_Charles_S/robert-collins/other/

Have fun!


Gerrit
-- 
=^..^=

Attachment: imagemagick-5.3.9-cygwin.patch
Description: Binary data

Attachment: imlib-1.9.11-cygwin.patch
Description: Binary data

Attachment: audiofile-0.2.1-cygwin.patch
Description: Binary data

Attachment: esound-0.2.23-cygwin.patch
Description: Binary data

Attachment: glib-1.2.10-cygwin.patch
Description: Binary data

Attachment: gtk-engines-0.12-cygwin.patch
Description: Binary data

Attachment: gtk-1.2.10-cygwin.patch
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]