How can I use the C/C++ Libpcap library within Wireshark
If you're on a UN*X, libpcap is usually shipped as part of the operating system, so it should Just Work.
If you're on Windows, you need a version of libpcap that's made to work on Windows. That's what Npcap is.
If you want to capture traffic on Windows, you will have to install Npcap; you can't just run a Wireshark from a flash drive or other medium containing a portable version of Wireshark without installing anything, you will have to install Npcap on your computer.
I downloaded it and it consists mainly of *.h files.
You downloaded the source code, which isn't directly usable. It has to be compiled - and installed.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…