Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue adding liblibwireshark to eclipse #3

Closed
JakeAbo opened this issue Sep 12, 2017 · 3 comments
Closed

Issue adding liblibwireshark to eclipse #3

JakeAbo opened this issue Sep 12, 2017 · 3 comments

Comments

@JakeAbo
Copy link

JakeAbo commented Sep 12, 2017

Hello,
I was wondering about adding liblibwireshark to eclipse oxygen ide(for c/c++).
How should i do it correctly? Should i cmake, make etc or just add it like a simple libary?

@a3f
Copy link
Contributor

a3f commented Sep 12, 2017

It's a CMake project. I don't know if Eclipse Oxygen has explicit support for CMake.
You could always build liblibwireshark separately and set include/link directory appropriately.
See also #2 for some instructions on how to build if you get stuck.

@JakeAbo
Copy link
Author

JakeAbo commented Sep 13, 2017

I am trying to build it first but i get the follow error while i try to make:

/liblibwireshark/build$ make
[ 11%] Built target caputils
[ 14%] Building C object CMakeFiles/objlib.dir/capture_opts.c.o
/home/jake/Pictures/liblibwireshark/capture_opts.c: In function ‘capture_opts_init’:
/home/jake/Pictures/liblibwireshark/capture_opts.c:61:53: error: ‘WTAP_MAX_PACKET_SIZE_STANDARD’ undeclared (first use in this function)
     capture_opts->default_options.snaplen         = WTAP_MAX_PACKET_SIZE_STANDARD;
                                                     ^
/home/jake/Pictures/liblibwireshark/capture_opts.c:61:53: note: each undeclared identifier is reported only once for each function it appears in
/home/jake/Pictures/liblibwireshark/capture_opts.c: In function ‘capture_opts_add_opt’:
/home/jake/Pictures/liblibwireshark/capture_opts.c:884:23: error: ‘WTAP_MAX_PACKET_SIZE_STANDARD’ undeclared (first use in this function)
             snaplen = WTAP_MAX_PACKET_SIZE_STANDARD;
                       ^
/home/jake/Pictures/liblibwireshark/capture_opts.c: In function ‘capture_opts_trim_snaplen’:
/home/jake/Pictures/liblibwireshark/capture_opts.c:1027:42: error: ‘WTAP_MAX_PACKET_SIZE_STANDARD’ undeclared (first use in this function)
                 interface_opts.snaplen = WTAP_MAX_PACKET_SIZE_STANDARD;
                                          ^
CMakeFiles/objlib.dir/build.make:302: recipe for target 'CMakeFiles/objlib.dir/capture_opts.c.o' failed
make[2]: *** [CMakeFiles/objlib.dir/capture_opts.c.o] Error 1
CMakeFiles/Makefile2:328: recipe for target 'CMakeFiles/objlib.dir/all' failed
make[1]: *** [CMakeFiles/objlib.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

@a3f
Copy link
Contributor

a3f commented Sep 13, 2017

If I were to take a guess, you built Wireshark with Autotools? There's nothing wrong with that, it just led to inclusion of the wrong config.h, I think. I just pushed 728cfaa, which should fix this error.

@a3f a3f closed this as completed Jan 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants