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

  • Home
  • SEARCH
  • 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 8224303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:01:14+00:00 2026-06-07T15:01:14+00:00

have run into a problem lately where I was looking for a particular header

  • 0

have run into a problem lately where I was looking for a particular header file. I couldn’t find it anywhere until I stumbled across it’s source in a google search which lead me to this site:

http://opensource.apple.com/release/mac-os-x-1068/

My question: Are these projects that are supposed to be downloaded separately, one at a time, to be used on OSX, or are they supposed to be already included with some developer package of OSX? I am a new OSX user, and all I know presently is that I have xcode on the box, but seem to be missing some libs that my code (given to me) is looking for.

Here is what my cmake file looks like:

project(myproject)
cmake_minimum_required(VERSION 2.8)
SET(CMAKE_BUILD_TYPE debug)
SET(CMAKE_C_FLAGS_DEBUG "-g -fPIC -O0 -pipe -std=c99")
SET(CMAKE_VERBOSE_MAKEFILE TRUE)
file(GLOB HEADER_LIST ./include/*.h)
include_directories(./include)
add_executable(${PROJECT_NAME} ${SRC_LIST} ${HEADER_LIST})
target_link_libraries(${PROJECT_NAME} -lpcap)

and my source file has

#include <net/bpf.h>
#include <pcap.h>

however, I am getting some errors with trying to use the structures that are supposed to be in pcap not being defined. Should I pull pcap separately from this apple open source lib, or as a part of a bigger package?

Thanks

  • 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-06-07T15:01:15+00:00Added an answer on June 7, 2026 at 3:01 pm

    EDIT: Your problem is that you’re relying on a private, internal data structure. pcap-int.h is not provided because it is not part of the public API.


    Most library headers (including pcap) are available in /usr/include, though typically you link them from the developer SDKs so that you can control the specific version you’re building against. To include and link with the correct headers and libraries using cmake, you generally use the CMAKE_OSX_SYSROOT variable. You control the deployment target with CMAKE_OSX_DEPLOYMENT_TARGET. For example, here is an old one of mine:

    set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.5.sdk")
    set(CMAKE_OSX_DEPLOYMENT_TARGET 10.4)
    

    The latest versions of Xcode are no longer in /Developer, so you would need to point into /Applications/Xcode.app. You can get the correct path using:

    xcode-select -print-path
    

    Not everything on opensource.apple.com is available in the SDKs directly. Some things are private. You could install them from opensource.apple.com, though I’ve often found that they won’t correctly build that way (you often wind up having to install a lot of other packages from Apple and it gets to be a headache). If you need something like that, it’s often much easier to just install the “normal” version and statically link it into your program.

    But pcap should work fine. What problem are you actually seeing?

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

Sidebar

Related Questions

here's a problem that i've run into lately: I have a listview with a
I have run into a problem with generics in Java and I can't find
One problem that I have frequently run into lately is the problem of my
I have run into this problem across multiple programming languages and I was just
I have run into an interesting problem lately: Lets say I have an array
I'm using SWFUpload to handle file uploads and have run into a problem where
I have run into a problem with Eclipse Indigo, attempting to start up my
I have run into a problem trying to modify a form I myself have
I have run into a problem w/ my model for databinding in WPF. I
I have run into a problem... I'm trying to use QTKit in an application

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.