-1

i mean while using user defined libraries in c we write:

#include "libname.h"

but for predefined libraries we use angular brackets instead of quotes.

#include <libname.h>

I want to include my library in predefined libraries and want use them in the same way we use predefined libraries.

Evg
  • 23,109
  • 5
  • 38
  • 74
uditkumar11
  • 195
  • 9

1 Answers1

0

Every compiler supports a way for including additional directories. And any file contained in these directories will be able to be included with its name enclosed by angular brackets.

For example gcc provides -I option:

gcc -ImyPath myfile.c ...

If myHeader.h is contained in myPath directory, myfile.c can include it in this way

#include <myHeader.h>

Check the guide of your compiler to discover how this is achieved by it. If you are using a graphical IDE you will find for sure this capability in your project option (check compiler options).

Evg
  • 23,109
  • 5
  • 38
  • 74
Roberto Caboni
  • 6,699
  • 10
  • 24
  • 37