This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: compile in cygwin


Duong Duong wrote:
> 
> I download an component buibded in linux and recopiled
> it in cygwin but gcc showed somne errors. One of them
> are the error in string.h file.
> I attach this source code with this email. It is open
> source VietNamese keyboard for linux.
> Could you help me? Thanks

This is a question about an X11 app, so it probably belongs on
cygwin-xfree@cygwin.com and not on this list.

>From the doc/manual in the tarball:

- The system must have either en_US.UTF-8 or vi_VN.UTF-8 locale
installed

I believe that Cygwin does not have any locale support for anything but
the default "C" locale, so it doesn't sound like it's going to work.

That said it seems to compile okay for me with a few minor changes.  I
cannot test it, but I'll tell you what I did.

First of all, I didn't get any errors about "string.h" so I suspect
you're missing some -devel packages.  At the very least you'll need
xorg-x11-devel.  Use the package search feature of the cygwin.com web
site to find out what you're missing if you have to.

Next, the program #defines a macro named _PTR which collides with the
one of the same name in the libc include files.  You will have to edit
src/IMdkit/FrameMgr.h and src/IMdkit/i18nIMProto.c to rename _PTR to
something else.  I just called it _PTR2.  You can do this with a command
such as:

perl -i.bak -pe 's/_PTR\(/_PTR2\(/'
src/IMdkit/{FrameMgr.h,i18nIMProto.c}

There's also a problem with the link order in src/xim/Makefile.am.  The
libIMdkit library links against some libX11 symbols and the linker will
complain unless -lX11 comes after libIMdkit.la in the link command
line.  See attached patch.

Finally you will need to edit src/gui/gui.c to replace WAIT_ANY in the
call to waitpid() with -1.  I think WAIT_ANY is a glibc-ism that's not
portable.

Now from the top level directory run "autoreconf --install --force
--verbose", "./configure", and then "make".  You should have everything
built at this point.  That is where I stopped, you're on your own from
there on.

Brian
--- src/xim/Makefile.am	2005-03-07 00:38:36.781250000 -0800
+++ src/xim/Makefile.am.orig	2005-03-07 00:38:08.578125000 -0800
@@ -11,8 +11,8 @@
 ukxim_CFLAGS =  \
     @X_CFLAGS@
 ##ukxim_LDADD = ../IMdkit/libXimd.a ../ukengine/libUnikey.la
-ukxim_LDADD = ../IMdkit/libIMdkit.la -lX11 ../ukengine/libUnikey.la ../vnconv/libvnconv.la
-ukxim_LDFLAGS = @X_LIBS@ @X_PRE_LIBS@
+ukxim_LDADD = ../IMdkit/libIMdkit.la ../ukengine/libUnikey.la ../vnconv/libvnconv.la
+ukxim_LDFLAGS = @X_LIBS@ @X_PRE_LIBS@ -lX11
 
 EXTRA_DIST = install.sed uninstall.sed
 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]