Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help Including header files?

Status
Not open for further replies.

webowner47

Programmer
Nov 26, 2018
16
DZ
hello,
i'm using c++ builder for a quite some time now, i'm having problems including files in order to use some apis like "PcapPlusPlus" for network sniffing,
the problem is when i successfully put my files in the project directory and include them, it always show me 100 thousands of errors like (unable to include file, unable to open include file, undefined function...), i mean OMG, i cannot program like this, at least no one can -_-.

my file include attempts:

Code:
#include "Packet++\header\IPv4Layer.h"
#include "Packet++\header\Packet.h"
#include "Pcap++\header\PcapFileDevice.h"

Code:
#include <IPv4Layer.h>
#include <Packet.h>
#include <PcapFileDevice.h>


please help, i started to get bored :)


 
The second example is for headers that are included in your library and the path has been set up in the library.

Unless the the files are located directly under the root directory, e.g. C:\Pcap++\header\, the first example won't work either. You will need to either put the full path file in or the relative path to your programs.


James P. Cottingham
I'm number 1,229!
I'm number 1,229!
 
I tried relative path and full path always end up with same errors, but other compilers works fine.
 
What are the errors and compiler, i.e., BCC6, C++Builder 10.2, etc.? I do this all the time.


James P. Cottingham
I'm number 1,229!
I'm number 1,229!
 
i currently using c++Builder 10.1, the errors are:
undefined reference from '*****/****/***/***/unit1.obj'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top