-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
  • 25,259
  • 5
  • 41
  • 83
uditkumar01
  • 400
  • 5
  • 11

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
  • 25,259
  • 5
  • 41
  • 83
Roberto Caboni
  • 7,252
  • 10
  • 25
  • 39