[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] Linking against freetype in Linux
From: |
Nelson H. F. Beebe |
Subject: |
Re: [ft] Linking against freetype in Linux |
Date: |
Wed, 26 Jun 2019 15:17:28 -0600 |
>> $ nm /lib/x86_64-linux-gnu/libfreetype.so
>> nm: /lib/x86_64-linux-gnu/libfreetype.so: no symbols
Add the -D (--dynamic) option; I wish that nm wasn't so stupid to need
it:
% nm -D /usr/lib64/libfreetype.so.6.14.0 | grep ' T ' | sort -k3,3
00000000000771a0 T FTC_CMapCache_Lookup
0000000000076e20 T FTC_CMapCache_New
0000000000075fe0 T FTC_ImageCache_Lookup
...
000000000001c1d0 T FT_Hypot
00000000000170f0 T FT_Init_FreeType
0000000000023dc0 T FT_Library_SetLcdFilter
...
So, on my CentOS 7 (roughly the same as Red Hat 7) GNU/Linux
workstation, our shared library has the symbol FT_Init_FreeType that
your linker could not find.
--------------------------------------------------
P.S. One more thing to check when linking fails to find an expected
function in a library is the freshness of the loader cache: as root,
run
# ldconfig
to update the cache.
You can also run the system call tracer to find out where library
files are looked for, and whether they are found, and then
successfully opened:
% strace -o foo.log -f cc foo.c -lbar
% fgrep -i 'open(' foo.log
% fgrep -i 'stat(' foo.log
-------------------------------------------------------------------------------
- Nelson H. F. Beebe Tel: +1 801 581 5254 -
- University of Utah FAX: +1 801 581 4148 -
- Department of Mathematics, 110 LCB Internet e-mail: address@hidden -
- 155 S 1400 E RM 233 address@hidden address@hidden -
- Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------
- [ft] Linking against freetype in Linux, Kris, 2019/06/26
- Re: [ft] Linking against freetype in Linux, Lawrence D'Oliveiro, 2019/06/26
- Re: [ft] Linking against freetype in Linux, armin, 2019/06/26
- Re: [ft] Linking against freetype in Linux, Kris, 2019/06/26
- Re: [ft] Linking against freetype in Linux,
Nelson H. F. Beebe <=
- Re: [ft] Linking against freetype in Linux, Kris, 2019/06/26
- Re: [ft] Linking against freetype in Linux, Lawrence D'Oliveiro, 2019/06/26
- Re: [ft] Linking against freetype in Linux, Kris, 2019/06/27
- Re: [ft] Linking against freetype in Linux, Lawrence D'Oliveiro, 2019/06/27
- Re: [ft] Linking against freetype in Linux, Kris, 2019/06/28