[bootlin/training-materials updates] master: labs/sysdev-application-development-and-debugging: just need pkg-config --libs (1f2a8be2)

Michael Opdenacker michael.opdenacker at bootlin.com
Mon Oct 24 09:45:46 CEST 2022


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/1f2a8be2c31b14959c406512cb9b5b39f108bf73

>---------------------------------------------------------------

commit 1f2a8be2c31b14959c406512cb9b5b39f108bf73
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date:   Mon Oct 24 09:45:46 2022 +0200

    labs/sysdev-application-development-and-debugging: just need pkg-config --libs
    
    Since only the libmpdclient library was necessary to link
    our application, just call the "--libs" option of pkg-config.
    
    Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>


>---------------------------------------------------------------

1f2a8be2c31b14959c406512cb9b5b39f108bf73
 .../sysdev-application-development-and-debugging.tex        | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/labs/sysdev-application-development-and-debugging/sysdev-application-development-and-debugging.tex b/labs/sysdev-application-development-and-debugging/sysdev-application-development-and-debugging.tex
index f90cf4c8..ee239fe0 100644
--- a/labs/sysdev-application-development-and-debugging/sysdev-application-development-and-debugging.tex
+++ b/labs/sysdev-application-development-and-debugging/sysdev-application-development-and-debugging.tex
@@ -57,16 +57,15 @@ Let's try to compile the application:
 The compiler complains about undefined references to some symbols in
 {\em libmpdclient}. This is normal, since we didn't tell the compiler
 to link with this library. So let's use \code{pkg-config} to query the
-{\em pkg-config} database about the location of the header files and
-the list of libraries needed to build an application against
-{\em libmpdclient}\footnote{Again, \code{output/host/bin} has a special
-\code{pkg-config} that automatically knows where to look, so it
-already knows the right paths to find \code{.pc} files and their
-sysroot.}:
+{\em pkg-config} database about the list of libraries needed to build
+an application against {\em libmpdclient}\footnote{Again,
+\code{output/host/bin} has a special \code{pkg-config} that
+automatically knows where to look, so it already knows the right paths
+to find \code{.pc} files and their sysroot.}:
 
 \begin{bashinput}
 $ arm-linux-gcc -o nunchuk-mpd-client nunchuk-mpd-client.c \
-$(pkg-config --libs --cflags libmpdclient)
+$(pkg-config --libs libmpdclient)
 \end{bashinput}
 
 Strip the \code{nunchuk-mpd-client} program, and copy




More information about the training-materials-updates mailing list