0

I am trying to extract archived files in my project using Libarchive. On a standalone code, i include libarchive's archive.h using:

#include <archive.h>

But I have seen on projects that header files are not included directly, they use:

#include <poppler/cpp/poppler-document.h>

Why is poppler-document.h not directly included? So how are these directories specified?

Parth Kapadia
  • 507
  • 6
  • 18
  • the include<> means the the compiler/linker will look for files in its own registry. that's why you are able to #include because it's built into the compiler out of the box. if you include external libraries/packages, you either embed them into the implementation of the compiler you're using (in which case you should be able to use something like #include), or you put them into your project folder – Midnight Exigent May 29 '20 at 03:27
  • Then why does archive.h is directly included, #include gives a error. – Parth Kapadia May 29 '20 at 03:29

1 Answers1

0

If you're on visual studio you can go on Project Properties/"C/C++"/General and look at the additional include directories where you can add the directory of where those includes are. For including the .libs themselves you'll need to go in Linker/Additional Library Directories

Swaqq
  • 26
  • 4