[ltt-dev] linking ust with C++ code
Irina Guilman
irina.guilman at ericsson.com
Fri Oct 14 17:28:46 EDT 2011
I thought that's how you normally link c functions from c++.
Another alternative is probably to have a dummy .c file which includes ust/marker.h and then in the Makefile indicate that dummy.c is required for compilation of your .cc or .cpp file
________________________________
From: guven turgut [mailto:guventurgut at hotmail.com]
I was able to get around this with the following extern statement around the marker.h include.
extern "C"
{
#include <ust/marker.h>
}
Very wierd, thanks for the replies though.
Have a nice weekend.
-Guven
> From: irina.guilman at ericsson.com
> To: guventurgut at hotmail.com; ltt-dev at lists.casi.polymtl.ca
> Date: Fri, 14 Oct 2011 17:01:43 -0400
> Subject: RE: [ltt-dev] linking ust with C++ code
>
> You mean if you are calling from c++ code c functions ust_marker(...) and others?
>
> -----Original Message-----
> From: GT [mailto:guventurgut at hotmail.com]
> Sent: October-14-11 4:48 PM
> To: ltt-dev at lists.casi.polymtl.ca
> Subject: Re: [ltt-dev] linking ust with C++ code
>
> Irina Guilman <irina.guilman <at> ericsson.com> writes:
>
> >
> > Which same issue?
> >
>
>
>
> The undefined symbols when I go to link to the c++ app with ust lib's:
>
> undefined reference to `ust_marker_probe_cb(ust_marker const*, void*, ...)'
>
> undefined reference to `__ust_marker_empty_function(ust_marker const*, void*, void*, char const*, __va_list_tag (*) [1])'
>
>
> This worked fine in previous version of ust for me. I am cross compiling for powerpc linux with windriver toolchain.
>
>
> -Guven
>
>
>
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20111014/e3bb32b8/attachment-0002.htm>
More information about the lttng-dev
mailing list