]> git.ipfire.org Git - thirdparty/newt.git/commit
libnewt.pc: add data for static linking
authorAlexey Sheplyakov <asheplyakov@altlinux.org>
Mon, 16 Aug 2021 07:01:57 +0000 (07:01 +0000)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 16 Aug 2021 07:25:41 +0000 (09:25 +0200)
commita7533580cd092e6a71c4ed722e830da4eb884d06
treebd2e6d961b965585eba770ca9f50ba1788f98e06
parente418dd9b6e38935210f8e8b9ce3f5c837fbf579c
libnewt.pc: add data for static linking

With this patch I can statically link a binary with libnewt without listing
the required libraries manually:

gcc -o test_static test.c `pkg-config --libs --cflags --static libnewt`

Without this patch static linking fails due to multiple undefined
references:

/usr/bin/ld: /tmp/test.AcRBJp.ltrans0.ltrans.o: in function `buttonDrawIt':
<artificial>:(.text+0x2f0): undefined reference to `SLsmg_set_color'
/usr/bin/ld: <artificial>:(.text+0x307): undefined reference to `SLtt_Use_Ansi_Colors'
/usr/bin/ld: <artificial>:(.text+0x31b): undefined reference to `SLsmg_set_color'
/usr/bin/ld: <artificial>:(.text+0x338): undefined reference to `SLsmg_write_char'
/usr/bin/ld: <artificial>:(.text+0x341): undefined reference to `SLsmg_write_string'
/usr/bin/ld: <artificial>:(.text+0x34b): undefined reference to `SLsmg_write_char'
/usr/bin/ld: <artificial>:(.text+0x3ae): undefined reference to `SLsmg_set_color'
/usr/bin/ld: <artificial>:(.text+0x3cd): undefined reference to `SLsmg_write_char'
/usr/bin/ld: <artificial>:(.text+0x3d5): undefined reference to `SLsmg_write_string'
/usr/bin/ld: <artificial>:(.text+0x3df): undefined reference to `SLsmg_write_char'
/usr/bin/ld: <artificial>:(.text+0x3f9): undefined reference to `SLsmg_set_color'
/usr/bin/ld: <artificial>:(.text+0x422): undefined reference to `SLsmg_set_color'
/usr/bin/ld: <artificial>:(.text+0x45d): undefined reference to `SLsmg_set_color'
/usr/bin/ld: <artificial>:(.text+0x476): undefined reference to `SLsmg_set_color'
/usr/bin/ld: <artificial>:(.text+0x486): undefined reference to `SLsmg_set_color'
/usr/bin/ld: /tmp/test.AcRBJp.ltrans0.ltrans.o:<artificial>:(.text+0x4d6): more undefined references to `SLsmg_set_color' follow
[287 lines skipped]
collect2: error: ld returned 1 exit status

Closes: #17
libnewt.pc.in