Wireshark mailing list archives
Re: mix of c and C++
From: Helge Kruse <Helge.Kruse-nospam () gmx net>
Date: Tue, 19 Jul 2011 13:08:35 +0200
Am 19.07.2011 12:02, schrieb sagar Guledagudda:
now i am getting linker error like : undefined reference to `proto_register_protocol' : undefined reference to `proto_register_field_array' : undefined reference to `proto_register_subtree_array' : undefined reference to `register_dissector' : undefined reference to `prefs_register_protocol' : undefined reference to `prefs_register_uint_preference' : undefined reference to `prefs_register_string_preference' : undefined reference to `register_init_routine' : undefined reference to `register_postseq_cleanup_routine' i have added library path to wireshark/epan where the proto.h is there which contains the above functions. do u have idea abt wat els s required to be done to get through this ?
Adding a path is not sufficient. You need to add the library file that defines the symbols. In a Windows build you add the library files _after_ the object files to the linker command line. That looks similar like this (on one line):
link -dll /out:mymodule.dll myobject1.obj myobject2.obj ..\..\epan\libwireshark.lib ..\..\wsutil\wsutil.lib ....In a Unix-build you will replace the .lib files with .so or .sa files. I assume the .sa is deprecated.
You can compare your makefile with one of the makefiles in the plugins tree to get the idea.
___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- mix of c and C++ sagar sg (Jul 18)
- Re: mix of c and C++ Helge Kruse (Jul 18)
- Re: mix of c and C++ sagar sg (Jul 18)
- Re: mix of c and C++ Helge Kruse (Jul 18)
- Re: mix of c and C++ sagar Guledagudda (Jul 18)
- Re: mix of c and C++ Helge Kruse (Jul 18)
- Re: mix of c and C++ sagar Guledagudda (Jul 19)
- Re: mix of c and C++ sagar Guledagudda (Jul 19)
- Re: mix of c and C++ Helge Kruse (Jul 19)
- Re: mix of c and C++ Stephen Fisher (Jul 27)
- Re: mix of c and C++ Jeff Morriss (Jul 27)
- Re: mix of c and C++ Guy Harris (Jul 27)
- Re: mix of c and C++ Jeff Morriss (Jul 27)
- Re: mix of c and C++ sagar sg (Jul 18)
- Re: mix of c and C++ Helge Kruse (Jul 18)
- Re: mix of c and C++ Helge Kruse (Jul 27)