aaed4c5eab14cf68a977586e4b3fcc9fbfb9bce2
[lttng-docs.git] /
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.029923 seconds and 3 git commands to generate.