tvb_format_stringzpad reported as undefined
Compiling my custom plugin on Apple silicon that calls tvb_format_stringzpad(), I get a linker error saying: Undefined symbols for architecture arm64: "_tvb_format_stringzpad", referenced from: my_dissector_function in packet-my_proto.o ld: symbol(s) not found for architecture arm64
The symbol seems to be available in: % lipo -archs libwireshark.15.0.7.dylib arm64
% nm -arch arm64 wireshark/build/run/Debug/libwireshark.15.0.7.dylib | grep 'tvb_format_stringzpad$' 00000000000c6c18 t _tvb_format_stringzpad
This being compiled against wireshark-3.6.7: % git rev-parse --short HEAD 4a304d7ec2
Any pointers on how to proceed would be appreciated.
I think I got the answer. tvb_format_stringzpad is not an exported function and seems to be restricted for use within libwireshark itself by not being declared as WS_DLL_PUBLIC, is that correct?
There is a
Closed
issue (585: Export tvb_format_stringzpad() functions) that discusses "best practice".Thanks. I'll look into that.