Project

General

Profile

Actions

Feature #338

closed

Trace probe can not be compiled with g++

Added by Ansgar Radermacher over 11 years ago. Updated almost 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
09/17/2012
Due date:
% Done:

100%

Estimated time:

Description

I'd like to use LTTng in the context of C++ projects. The trace probe itself is always a "C" file, in the examples called tp.c.

If I use a C++ file instead, e.g. by renaming the tp.c to tp.cpp, the compilation fails, since the two enumerations alloc and sync are defined within the scope of the lttng_ust_lib_ring_buffer_config structure and thus their literals are not found (there are additional problems, if I try to define these two enumerations on top level).

Using a C file instead of a C++ is sometimes a bit problematic. In my case, I am integrating LTTng into the Papyrus code generation and I do not like mixing the C and C++ code generation (although possible).


Files

Actions

Also available in: Atom PDF