On Wed, 20 Jul 2011, Комар Максим wrote:
I want to install package NetSNMP:
cabal install NetSNMP
Resolving dependencies...
Configuring NetSNMP-0.1.6...
cabal: Missing dependency on a foreign library:
* Missing C library: netsnmp
Package net-mgmt/net-snmp already installed:
pkg_info | grep snmp
net-snmp-5.5_4 An extendable SNMP implementation
As Cabal tells, the developer files are needed, too, and are usually found in packages ending on '-dev' or '-devel', that is, in your case net-snmp-dev.
Ports is build-from-source, so every package is what Linux calls a -dev package.
The OP might need to make sure that cabal knows to look in /usr/local for libraries.