I just started practicing Static Linking, and I tried to link a third party library into my code, but it kept bugging error: "The header file not found", so I believe there're some steps missing from my code.
Here is the situation: I use OpenGL as the target library, it contains two directories: "Include" directory which holds header files and "lib-arm64"directory which holds "libglfw3.a" and "libglfw.3.dylib". I believe .dylib is related to dynamic linking, so I am not gonna touch that and .a file is the source code I need. Therefore:
- In Build Phase -> Linking Binary with Library, I attach "libglfw3.a".
- In Build Setting -> Search Path, I include the address of header directory "Include" in "Header Search Path" and "lib-arm64" in "Library Search Path".
#include <GLFW/glfw3.h>is the command I copied from OpenGL website template and used in my code.
The error is:
GLFW/glfw3.h' file not found
If anyone has any advice, feel free to share it, I really appreciate!