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 8890833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:35:34+00:00 2026-06-14T22:35:34+00:00

I have been trying to install libnids (Ubuntu LTS and Mac OS X) all

  • 0

I have been trying to install libnids (Ubuntu LTS and Mac OS X) all the day and now I know how to compile programs with it.

I write this here because there is not much documentation but there are samples in the libnids downloaded folder with a makefile. The important things of this makefile are these:

CC = gcc    
PCAPLIB     = -lpcap    
LNETLIB     = -lnet    
LIBS        = -L../src -lnids $(PCAPLIB) $(LNETLIB) -lgthread-2.0 -lnsl

example:
    $(CC) example.c -o example $(LIBS)

And if you’re compiling it in Mac OS X ignore this: -lgthread-2.0 -lnsl -L../src
But I don’t know if something stop to works because of these omitted things.

  • 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-14T22:35:35+00:00Added an answer on June 14, 2026 at 10:35 pm

    I found it. The best way is to compile the library and then use local reference to the “.a” file.

    Makefile example

    CC = gcc -g -Wall 
    GLIB =  `pkg-config --cflags --libs glib-2.0`
    PCAPLIB     = -lpcap
    LNETLIB     = -lnet
    
    LIBS_SRC    = libnids-1.24/src/libnids.a
    LIBS        = $(PCAPLIB) $(LNETLIB) -lgthread-2.0 
    
    program: program.c
        $(CC) -c $(CFLAGS) program.c -o program.o $(GLIB) $(LIBS)
        $(CC) program.o  -o program $(LIBS_SRC) $(GLIB) $(LIBS)
    

    But if you want to compile the library and install it into your system you got to use -lnids instead of the above way. But the first solution always works.

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

Sidebar

Related Questions

I have been trying to install ReviewBoard and all looks like it has gone
I have been trying to install tomcat-6.0.26 on my Mac OS 10.6. I followed
I have been trying all day to get app-engine sdk to work nothing has
I have been trying to install the GD toolkit on my Ubuntu VM. The
I have been trying to install all dependencies using phar but it always give
I have been trying to install Oracle 11g R2 on Centos 6.2 for a
I have been trying to install ImageMagick for one week. The documentation I found
I'm trying to install bcrypt-ruby on Windows Vista. So far, I have been able
I have been trying for almost a week now to create an SQLite database
I have been trying to install the R language with homebrew but when 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.