<div dir="ltr">Great. Thank you. That worked.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 28, 2015 at 11:27 AM, Mathieu Desnoyers <span dir="ltr"><<a href="mailto:mathieu.desnoyers@efficios.com" target="_blank">mathieu.desnoyers@efficios.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000"><hr><div><div class="h5"><blockquote style="border-left:2px solid #1010ff;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><div dir="ltr">Hello,<div><br></div><div>In the example (hello) provided, I tried to print complex data types instead of usual ints or floats. My header file looks like this.</div><div><br></div><div><div>#undef TRACEPOINT_PROVIDER</div><div>#define TRACEPOINT_PROVIDER hello_world</div><div><br></div><div>#undef TRACEPOINT_INCLUDE</div><div>#define TRACEPOINT_INCLUDE "./hello-tp.h"</div><div><br></div><div>#if !defined(HELLO_TP_H) || defined(TRACEPOINT_HEADER_MULTI_READ)</div><div>#define HELLO_TP_H</div><div><br></div><div>#include <lttng/tracepoint.h></div><div><br></div><div>#include "myinc.h"</div><div><br></div><div>TRACEPOINT_EVENT(</div><div>    hello_world,</div><div>    my_first_tracepoint,</div><div>    TP_ARGS(</div><div>        const char*, my_string_arg</div><div>    ),</div><div>    TP_FIELDS(</div><div>        ctf_integer(int, my_string_field, atoi(my_string_arg))</div><div>    )</div><div>)</div></div><div><br></div><div>My include file looks like this (myinc.h)</div><div>typedef unsigned char uuid_t;<br></div><div><br></div><div>However, when I try to compile it using, lttng-gen-tp, I am getting the following error.</div><div><br></div><div><div>root@mvm236:~/heelo_prog# lttng-gen-tp <a href="http://hello-tp.tp" target="_blank">hello-tp.tp</a><br></div><div>In file included from ././hello-tp.h:13:0,</div><div>                 from /usr/include/lttng/ust-tracepoint-event.h:740,</div><div>                 from /usr/include/lttng/tracepoint-event.h:58,</div><div>                 from hello-tp.h:56,</div><div>                 from hello-tp.c:7:</div><div>././myinc.h:1:1: error: expected expression before ‘typedef’</div></div><div><br></div><div>Whatever I try to include, I am getting this error.</div><div><br></div><div>Can you please help.</div></div></blockquote></div></div><div>Try adding include guards around your header myinc.h, e.g.:<br></div><div><br></div><div>#ifndef _MYINC_H<br></div><div>#define _MYINC_H<br></div><div>typedef unsigned char uuid_t;<br></div><div>#endif<br></div><div><br></div><div>It will ensure the header content does not get included multiple<br></div><div>times by ust-tracepoint-event.h.<br></div><div><br></div><div>Thanks,<br></div><div><br></div><div>Mathieu<br></div><div><br></div><blockquote style="border-left:2px solid #1010ff;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><div dir="ltr"><div><br></div><div>-- Chid</div></div><br>_______________________________________________<br>lttng-dev mailing list<br><a href="mailto:lttng-dev@lists.lttng.org" target="_blank">lttng-dev@lists.lttng.org</a><br><a href="http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev" target="_blank">http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</a><span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><span class="HOEnZb"><font color="#888888"><div><br><br></div><div><br></div><div>-- <br></div><div><span name="x"></span>Mathieu Desnoyers<br>EfficiOS Inc.<br><a href="http://www.efficios.com" target="_blank">http://www.efficios.com</a><span name="x"></span><br></div></font></span></div></div></blockquote></div><br></div>