×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Need Help Including header files?

Need Help Including header files?

Need Help Including header files?

(OP)
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 --> C++

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

CODE --> C++

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


please help, i started to get bored :)


RE: Need Help Including header files?

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!

RE: Need Help Including header files?

(OP)
I tried relative path and full path always end up with same errors, but other compilers works fine.

RE: Need Help Including header files?

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!

RE: Need Help Including header files?

(OP)
i currently using c++Builder 10.1, the errors are:
undefined reference from '*****/****/***/***/unit1.obj'

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close