|
Home > Archive > Unix administration > April 2007 > cygwin path problem
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
cygwin path problem
|
|
| johnmmcparland@googlemail.com 2007-04-18, 7:19 am |
| Hi all,
I am doing some C / C++ programming in cygwin and I notice when I add
something to my path then try to compile, the gcc / g++ compiler
cannot find some files, even though they are in the directory I may
have just added to my path.
For example I have copied the example program from http://www.gtk.org/tutorial/c39.html
and when I compiled it, the compiler couldn't find gtk/gtk.h.
I thought to solve this I would have to add the path to gtk/gtk.h to
my path and so I did;
> PATH=$PATH:/usr/include/gtk-2.0
then I compiled again and while it found gtk.h it could not find a lot
of other gtk headers, such as gtktext.h. However this and the other
files which were not found are also in /usr/include/gtk-2.0 and they
are included as <gtk/gtktext.h>.
I'm guessing that my path has not been set right but I'm fumbling in
the dark. If someone could help it would be greatly appreciated.
John
| |
| Jean-Rene David 2007-04-18, 1:22 pm |
| * johnmmcparland@googlemail.com [2007.04.18 10:52]:
> I am doing some C / C++ programming in cygwin and I notice
> when I add something to my path then try to compile, the
> gcc / g++ compiler cannot find some files, even though
> they are in the directory I may have just added to my
> path.
The compiler doesn't search the directories in the PATH
variable. These are searched by the *shell* to start
commands.
You tell the compiler where the include files are when you
invoke it. gcc uses the -I option. Check your compiler's
documentation otherwise.
> For example I have copied the example program from
> http://www.gtk.org/tutorial/c39.html and when I compiled
> it, the compiler couldn't find gtk/gtk.h.
That is a very bad way to describe a problem. Always include
the exact command you entered and the exact error message
you got, not *descriptions* of them.
You might also want to read this:
http://www.catb.org/~esr/faqs/smart-questions.html
--
JR
|
|
|
|
|