4

I am using Code::Block IDE just recently, not really familiar with it. And I have this project that need to use C API from Net-SNMP. I've download it, "Add Files" into the project, and link the new library (Build Options > Search Directories tab > Add).

However, whenever I compile, it always show the following error.

fatal error: net-snmp/net-snmp-config.h: No such file or directory

In my main.c file, the include code is as follow:

#include <net-snmp/net-snmp-config.h>

Did I miss something when link the new library to the project? I'm so confused right now.

Thank you in advance. Your help will be much appreciated.

shinega
  • 103
  • 1
  • 4
  • 12
  • Did you install the developer package for Net-SNMP? If yes: Where? If you know where look in it's directory tree for `net-snmp-config.h`. If found link it's containing directory to `/usr/include/net-snmp`. – alk Aug 21 '13 at 06:24
  • Yes, installed the developer package. I've even "Add Files" of the Net-SNMP into the project. Anyway, thank you for your interest in this, but I've abandon it and use Java instead for the SNMP. So much easier. – shinega Aug 28 '13 at 04:50

2 Answers2

3

on debian 8 install libsnmp-dev:

apt-get install libsnmp-dev

on debian 7 install net-snmp:

apt-get install net-snmp
Hasan Ramezani
  • 4,554
  • 20
  • 28
0

$ export C_INCLUDE_PATH=/usr/local/net-snmp-5.7.2/include/

$ export LDFLAGS="/usr/local/net-snmp-5.7.2/lib/"