Re: Glib/cygwin minor changes



On Wed, 6 Nov 2002, Huang. wrote:

Hello,

> I have built a DLL version of glib-2.0.6(and 
> gtk+-2.0.6,atk-1.0.3,pango-1.0.4) on cygwin too, just a little different 
> with you.
> The key is use the development versions of libtools( autoconf-2.5x + 
> automake-1.6 + hacked libtool-20020202) but not the stable 
> versions(autoconf-2.13 + automake-1.4-p5 + libtool-1.4.2), because 
> libtool-20020202 can build share libs but libtool-1.4.2 can't on cygwin.
> So, I cp
> /usr/autotool/devel/share/libtool/(config.guess,install-sh,ltmain.sh,mkinstalldirs,config.sub, 
>   missing)
>   to glib-2.0.6 root dir, replace old copies.

i tried also to to use the new autotools, but I have installed cygwin with
DOS line endings support, thus it failed to make because of "CRLF/LF errors"
in genrated Makefiles ... but that doesn't matter because when I added to
the three $(CC)* linking commands the -mdll option it linked the DLLs
without problem.

> > * glib/gutils.h (G_WIN32_DLLMAIN_FOR_DLL_NAME): set posix path on
> >   cygwin, don't define when compiling static glib
> the DllMain is not needed

It is not needed when you use your programs compiled with cygwin glib just
inside the cygwin environment and have it installed the "unix way". But
once you decide to package your program with cygwin runtime and all other
required libraries it needs, you will need the DllMain to find the path
where glib/pango/gtk+ have its files. Exactly like you need it when
compiling with mingw or msvc.

> > * glib/gthread.c:
> > * glib/gstrfuncs.c:
> > * glib/gmain.c: don't dllexport global variables when compiling static 
> >   glib library
> > 
> i change some G_PLATFORM_WIN32 to G_OS_WIN32

Yes, new gcc is able to export the variables without requiring to use
dllexport, but older version require it, so it is clever to have it there
when compiling DLLs.

> > * gmodule/gmodule-win32.c: on cygwin set "cyg" prefix for modules instead
> >   of "lib" prefix used on mingw
> > 
> yes.
> i also change:
> glib-2.0.6/glib/libcharset/config.charset
> @@ -300,7 +300,7 @@
>   	# BeOS has a single locale, and it has UTF-8 encoding.
>   	echo "* UTF-8"
>   	;;
> -    msdosdjgpp*)
> +    msdosdjgpp*|cygwin*)

Yes, it seemds, that this change is also required. Same probably for
mingw.

Best regards,
Stevo.

-- 
         />   | Stefan Ondrejicka <ondrej idata sk>
        /<    | http://www.idata.sk/~ondrej/
[XXXXXX( O):::<===================================-
        \<
         \>




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