Initial import
[lttng-docs.git] / contents / using-lttng / instrumenting / advanced-techniques / 32-bit-on-64-bit / building-instrumented-32-bit-c-application.md
1 ---
2 id: building-instrumented-32-bit-c-application
3 ---
4
5 Let 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
9 The instrumentation process is unaltered.
10
11 First, a typical 64-bit build (assuming you're running a 64-bit system):
12
13 <pre class="term">
14 gcc -o hello64 -I. hello.c hello-tp.c -ldl -llttng-ust
15 </pre>
16
17 Now, a 32-bit build:
18
19 <pre class="term">
20 gcc -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
24 The `-rpath` option, passed to the linker, will make the dynamic loader
25 check for libraries in `/usr/lib32` before looking in its default paths,
26 where it should find the 32-bit version of `liblttng-ust`.
This page took 0.029618 seconds and 4 git commands to generate.