This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 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: Missing libs when compiling GTK+ code


On Sun, 27 Mar 2005, Radek Vokal wrote:

> > On Sat, 26 Mar 2005, Radek Vokal wrote:
> >
> > > On Sat, 26 Mar 2005 20:26:36 +0100, Gerrit P. Haase <gp@XXXXXXXXXXXX.XX> wrote:
> >
> > <http://cygwin.com/acronyms/#PCYMTNQREAIYR>.  Thanks.
> >
> > > > Radek Vokal wrote:
> > > >
> > > > > I'm trying to compile my project under Cygwin/X and faced several
> > > > > problems. The first one was missing libXrender.la file. Thanx to this
> > > > > mailing list I've solved this issue but right after fixing this the
> > > > > makefile reports:
> > > > >
> > > > > gcc.exe: /usr/lib/libgpg-error.dll.a: No such file or directory
> > > > > [snip]
> > > > > gcc.exe: /usr/lib/libiconv.dll.a: No such file or directory
> > > > > make[2]: *** [myproject.exe] Error 1
> > > > > etc.
> > > > >
> > > > > Strange that all these files are present in these directories. Am I
> > > > > missing some PATH configuration or ldconfig stuff?
> > > >
> > > > Just a guess: what about the permissions on these files?
> > > > Can you do `ls /usr/lib/libiconv.dll.a` as the same user who issues
> > > > the make command?  How looks the link command used?
> > >
> > > This looks fine. Does permission really mather in Cygwin anyway? I see
> > > all these listed files, ls -l /usr/lib/libiconv.dll.a says
> > >
> > > -rwxr-x---+ 1 rat Users 7630 Jul  6  2004 /usr/lib/libiconv.dll.a*
> > >
> > > which seems to be ok.
> >
> > Does it help if you run gcc with CYGWIN="notraverse"?
> >         Igor
> > --
>
> I think I do sth wrong. I started with helloword example trying to
> compile it with
>
> gcc -mms-bitfields -mno-cygwin -mwindows helloworld.c -o helloworld.exe `pkg-config --cflags gtk+-2.0` `pkg-config --libs gtk+-2.0`
>
> but I get several errors starting with
>
> helloword.c:1:21: gtk/gtk.h: No such file or directory
>
> which looks really supicious. When I try to locate gtk.h file I find it in
> /usr/include/gtk-1.2/gtk/gtk.h
> /usr/include/gtk-2.0/gtk/gtk.h

Brian is correct in that -mno-cygwin will make gcc look for the header
files, etc, in different places.  However, since your original e-mail
mentioned link errors rather than missing include file errors, and the
missing libraries are in the standard Cygwin locations, I'm assuming you
originally tried to use gcc without -mno-cygwin.  FWIW, it might be a good
idea to drop -mwindows as well...

> Igor, what does it mean CYGWIN="notraverse"?

It means to add "notraverse" to the value of the CYGWIN environment
variable before running gcc.  In bash, you can do it all on one line,
e.g.,

CYGWIN="$CYGWIN notraverse" gcc ...

This expands on Gerrit's question about permissions.  You may have
too-strict permission settings on some directories.  Newer Cygwin versions
by default check not only the permissions on files, but also the
permissions on all the directories in the path that is traversed to reach
those files.  The "notraverse" setting turns off this checking.

HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT


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