I recently compiled a shared lib from a directory of object fules, using the following invocation:
gcc -shared -fPIC -o libgtksourceview-core.so *.o `pkg-config gtk+-3.0 --libs` -lxml2`
This gave me a .so file that I was going to use with some NativeCall code. Well! Long story short: It didn't work:
Cannot locate symbol '_gtk_source_iter_forward_full_word_end' in native library '/home/cbwood/Projects/p6-SourceViewGTK/t/lib/libgtksourceview-core.so'
in method setup at
This is a bit confusing, since I can see the symbol just fine via readelf
:
$ readelf -s --wide *.so | grep _gtk | grep word_end
1704: 0000000000046d30 630 FUNC LOCAL DEFAULT 12 _gtk_source_iter_forward_visible_word_end
1714: 0000000000046290 273 FUNC LOCAL DEFAULT 12 _gtk_source_iter_forward_full_word_end
1764: 0000000000046740 378 FUNC LOCAL DEFAULT 12 _gtk_source_iter_forward_extra_natural_word_end
1776: 0000000000047300 200 FUNC LOCAL DEFAULT 12 _gtk_source_iter_forward_visible_word_ends
My NativeCall definition is clear enough:
sub _gtk_source_iter_forward_full_word_end (GtkTextIter $iter)
is native(sourceview_core)
is export
{ * }
What am I doing wrong? Do I need to recompile my shared library again?
Thanks!