cygwin path problem
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix administration > cygwin path problem




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    cygwin path problem  
johnmmcparland@googlemail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-18-07 12:19 PM

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






[ Post a follow-up to this message ]



    Re: cygwin path problem  
Jean-Rene David


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-18-07 06: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





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 05:43 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register