domain: add Python domain to list
[lttng-docs.git] / contents / using-lttng / instrumenting / advanced-techniques / 32-bit-on-64-bit / building-instrumented-32-bit-c-application.md
CommitLineData
5e0cbfb0
PP
1---
2id: building-instrumented-32-bit-c-application
3---
4
5Let us reuse the _Hello world_ example of
6[Tracing your own user application](#doc-tracing-your-own-user-application)
7([Getting started](#doc-getting-started) chapter).
8
9The instrumentation process is unaltered.
10
11First, a typical 64-bit build (assuming you're running a 64-bit system):
12
13<pre class="term">
14gcc -o hello64 -I. hello.c hello-tp.c -ldl -llttng-ust
15</pre>
16
17Now, a 32-bit build:
18
19<pre class="term">
20gcc -o hello32 -I. <strong>-m32</strong> hello.c hello-tp.c <strong>-L/usr/lib32</strong> \
21 -ldl -llttng-ust <strong>-Wl,-rpath,/usr/lib32</strong>
22</pre>
23
47bfcb75 24The `-rpath` option, passed to the linker, makes the dynamic loader
5e0cbfb0
PP
25check for libraries in `/usr/lib32` before looking in its default paths,
26where it should find the 32-bit version of `liblttng-ust`.
This page took 0.138355 seconds and 4 git commands to generate.