I am not sure whether this is a bug or the wrong I am using it. When I use extern declaration as follows, I always have compilation error. I used the easy-ust to demonstrate:
*diff --git a/doc/examples/easy-ust/sample_component_provider.h b/doc/examples/easy-ust/sample_component_provider.h* *index dd3c5f0..e70d650 100644* *--- a/doc/examples/easy-ust/sample_component_provider.h* *+++ b/doc/examples/easy-ust/sample_component_provider.h* @@ -61,6 +61,8 @@ */ #include <lttng/tracepoint.h> +extern int testint(int i); + /* * The following tracepoint event writes a message (c string) into the * field message of the trace event message in the provider *yanyh@vm*:*~/tools/lttng/lttng-ust/doc/examples/easy-ust*$ make cc -I. \ -save-temps -c -o sample.o sample.c cc -I. \ -save-temps -c -o tp.o tp.c In file included from */usr/include/lttng/ust-tracepoint-event.h:974:0*, from */usr/include/lttng/tracepoint-event.h:58*, from *sample_component_provider.h:137*, from *tp.c:33*: *././sample_component_provider.h:64:1:* *error: *expected expression before ‘*extern*’ extern int testint(int i); * ^* Makefile:34: recipe for target 'tp.o' failed make: *** [tp.o] Error 1 Thank you Yonghong
_______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev