Re: netsnmp getopt.h clashes with systemprovided getopt.h

This is a discussion on Re: netsnmp getopt.h clashes with systemprovided getopt.h within the SNMP Coders forums, part of the Networking and Network Related category; utpala m wrote: > I am including "unistd.h " in my code which inturn includes getopt.h. > ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-29-2007
Thomas Anders
 
Posts: n/a
Default Re: netsnmp getopt.h clashes with systemprovided getopt.h

utpala m wrote:
> I am including "unistd.h " in my code which inturn includes getopt.h.
> getopt.h is available in two locations
> /usr/include/
> /usr/local/include/netsnmp/library/ (when netsnmp is installed on the
> system)
>
> To include the net-snmp header files "/usr/local/include/netsnmp/library/"
> is also specifed in the include path.
> as a result compiler picks up getopt.h from
> "/usr/local/include/netsnmp/library/" instead of "/usr/include/" while
> including unistd.h
> How do I go about including getopt.h from /usr/include/ while using system
> provided header files like unistd.h


You shouldn't add "/usr/local/include/netsnmp/library/" to your include
path. I'd rather suggest to add the output of "net-snmp-config --cflags"
to your CFLAGS which is likely to contain "-I/usr/local/include" in your
case. If you need to include some header file
/usr/local/include/netsnmp/library/xxx.h, please do:

#include <net-snmp/library/xxx.h>


+Thomas

--
Thomas Anders (thomas.anders at blue-cable.de)

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?p...rge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:59 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0