Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3432290
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:25:51+00:00 2026-05-18T07:25:51+00:00

I am attempting to compile a program against libwireshark on Ubuntu 10.10. I have

  • 0

I am attempting to compile a program against libwireshark on Ubuntu 10.10. I have installed the wireshark-dev package, which has installed files in /usr/lib/wireshark and /usr/include/wireshark.

The head of my C source code file contains a #include <epan/epan.h> directive and my gcc command line arguments are as follows:

$ gcc -I/usr/include/wireshark `pkg-config --libs --cflags glib-2.0` -Wall -o test.out test.c -L/usr/lib/wireshark -lwireshark

However, this returns many errors, including:

/usr/lib/gcc/i686-linux-gnu/4.4.5/include/varargs.h:4: error: #error "GCC no longer implements <varargs.h>."
/usr/include/wireshark/epan/ftypes/ftypes.h:258: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘union’

What should I do to rectify these issues?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T07:25:52+00:00Added an answer on May 18, 2026 at 7:25 am

    It seems a simple case of user-unfriendly packaging and code organization. You need to include the “config” header for Wireshark first. I would write it this way:

    #include <wireshark/config.h> /* needed by epan */
    #include <epan/epan.h>
    

    Be sure that you do this first whenever you include headers from this library.

    How did I know? I dug into epan/proto.h and found that it conditionally includes varargs.h only if HAVE_STDARG is not set. I then grep‘d in /usr/include/wireshark/ and found this variable is set in config.h, so I figured it might be necessary to include it, and lo, it was.

    I also needed to add -lwiretap to satisfy linkage with libwireshark.

    Another nit in the organization of wireshark-dev is that it does not depend (at the package level) on wireshark-common, even though the latter does provide the actual libwireshark.so which the former symlinks to. So you should make sure that wireshark-common is installed, or that /usr/lib/libwireshark.so and its referent exist.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a program attempting to use classes from the jakarta-poi-3.0.2.jar in my /usr/share/java
Attempting to build a C# NPAPI plugin I have found a tutorial which describes
Attempting to get Spring internationalization working. I have used classpath:messages basename, created .properties files
I'm attempting to compile a simple hello world program in c with lcc-win32/wedit, and
I am attempting to compile and run a test C program in Xcode. This
I have Eclipse Helios with a java program set up. I'm attempting to create
I am attempting to compile and run a C program in Xcode. This program
I am attempting to build a simple OpenGL 3.2 program which consists of a
I'm trying to compile really large program in eclipse (inherited it). When attempting to
I'm attempting to use SCons to compile and link a simple Windows program. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.