make an include of a library outside the libraries folder

0

How do I include a library that is not in my library folder in C ++?

I know that the directive of #include with <> can make the include of the file that is not in the same folder, but if I have several folders with a library with the same name, I wonder if it would not confuse the library which I created, with other libraries of other C ++ projects that I also created on my PC.

I would like to know if it does not have an option for it to look in an out-of-root folder without having to put it all the way from where it is, using "" , or it will be able to find my library with <> same as I have other libraries in other folders with the same name?

Thank you for helping me.

    
asked by anonymous 11.05.2017 / 01:48

1 answer

1

You can put a portion of the pathname as follows:

#include <projeto1/meuHeader.h>
#include <projeto2/meuHeader.h>

But the path of these projects will need to be in the list of includes and in the list of libraries for linking. This final part depends on how it is working, it can be in Visual Studio / Eclipse directly, in the Makefile or in the CMakeList.

    
05.01.2018 / 17:27