So I'm trying to create my own library in C++ and use it in another project. So far it works with example code, but I have to include other libraries in my own library. So the problem is, that when I include the header files off my library, the include paths in the header files are messed up. A simple solution would be to add the search directories, but I don't think, thats how its supposed to be resolved.
Sample Code - Library header file:
#include <GL/glew.h>
#include <GLFW/glfw3.h>
int test();
The source file:
#include "sample.h"
int test() { return 20; }
Now the project in which I want to include the sample
#include <sample.h>
int main() { int a = test(); }
The problem is, that the include copies the code from sample.h directly into the main.cpp and the search directories for the other includes from sample.h are no longer defined