'Cannot open include file even when given the right path
I've been testing some stuff in Visual Studio after some time not working with VS, And I ran into a problem where I include a file and I get this error:
Cannot open include file 'spdlog/spdlog.h': No such file or directory
but I have the right path, in Project settings I have the right path set as an additional Include directory and the file is there. but the Thing is, when I take the file and move it one directory up and change the include path so that it now points one directory up (where the file is now) it suddenly works. Example:
File Path: Project/lib/spdlog/spdlog.h Include directory: Project/lib this Works
File Path: Project/lib/spdlog/spdlog/spdlog.h Include directory: Project/lib/spdlog This doesn't work
I don't want to include the lib directory since I have more libraries in it and it would just mess some stuff up, so I want to include every library (like spdlog for instance) separately. Does anyone know what might be causing the issue ? Also the error isn't shown when writing the code only when I try to build the Project.
Solution 1:[1]
Maybe you are missing spdlog library.
I suggest you check out this issue.
For debian-like distros you should be able to download it via apt-get: apt-get install libspdlog-dev.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Yujian Yao - MSFT |
