我在用户空间的fuse库中添加了一个新功能(fuse_lowlevel_notify_inval_directory)。
编译和创建libfuse.so没有出现错误。
但是当我的应用程序尝试使用这个新功能时,链接器会抛出错误:undefined reference to `fuse_lowlevel_notify_inval_directory' collect2: ld returned 1 exit status
我检查了nm后发现
nm ../libfuse.so | grep inval
00000000000154ed T fuse_invalidate
**000000000001e142 t fuse_lowlevel_notify_inval_directory**
000000000001e26c T fuse_lowlevel_notify_inval_entry
000000000001e1cb T fuse_lowlevel_notify_inval_inode
T/t代表符号出现在文本段中。如果是大写,该符号是全局的(外部的)。我怀疑这可能是问题所在。新添加的函数显示小写t,而其他旧函数则是大写T。你有什么想法我的错误可能是什么?