public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Using embedded c and including header files
@ 2010-08-12  5:40 Tim Beaulen
  2010-08-12 18:02 ` Frank Ch. Eigler
  0 siblings, 1 reply; 3+ messages in thread
From: Tim Beaulen @ 2010-08-12  5:40 UTC (permalink / raw)
  To: systemtap

Hello,

I'm experimenting with embedding c in my scripts but I have a problem.

When I add an include file, it doesn't find it. The compiler does not
look in /usr/include
I searched through the manual of gcc and set a couple of environment
variables (CPATH, ...), but this didn't work either.

Is it possible to tell the compiler where to look for headers? I don't
see an option in stap itself to set these directories. I'm using
systemtap 1.2 though.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Using embedded c and including header files
  2010-08-12  5:40 Using embedded c and including header files Tim Beaulen
@ 2010-08-12 18:02 ` Frank Ch. Eigler
  0 siblings, 0 replies; 3+ messages in thread
From: Frank Ch. Eigler @ 2010-08-12 18:02 UTC (permalink / raw)
  To: Tim Beaulen; +Cc: systemtap

Tim Beaulen <tbscope@gmail.com> writes:

> I'm experimenting with embedding c in my scripts but I have a problem.
> When I add an include file, it doesn't find it. The compiler does not
> look in /usr/include [...]

We don't have a good story with respect to user-space headers being
pulled into embedded-C.  What do you need from there that @cast(),
using a user-space header path as its third argument, can't get at?

- FChE

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Using embedded c and including header files
@ 2010-08-12  6:03 Wenji Huang
  0 siblings, 0 replies; 3+ messages in thread
From: Wenji Huang @ 2010-08-12  6:03 UTC (permalink / raw)
  To: tbscope; +Cc: systemtap

>llo,
>
>I'm experimenting with embedding c in my scripts but I have a problem.
>
>When I add an include file, it doesn't find it. The compiler does not
>look in /usr/include

This is for user space program.
>I searched through the manual of gcc and set a couple of environment
>variables (CPATH, ...), but this didn't work either.
>
>Is it possible to tell the compiler where to look for headers? I don't
>see an option in stap itself to set these directories. I'm using
>systemtap 1.2 though.

The standard searching path is your kernel module building path, like

/lib/modules/2.6.18-8.el5/build/include

put your file under that, or modify Makefile 

Regards,
Wenji

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-12 18:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-12  5:40 Using embedded c and including header files Tim Beaulen
2010-08-12 18:02 ` Frank Ch. Eigler
2010-08-12  6:03 Wenji Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).