开发者

Problem with MSVC includes

开发者 https://www.devze.com 2023-03-03 09:58 出处:网络
I\'m working on making a library. Eventually I will use CMake but right now I\'m just using MSVC. First my directory structure (as an example) will be as follows:

I'm working on making a library. Eventually I will use CMake but right now I'm just using MSVC.

First my directory structure (as an example) will be as follows:

LibRoot
 blah.h
   SubRoot
     bloop.h

The way I used to include blah in bloop was by doing:

#include "../blah.h"

I looked at many other libraries and they did开发者_如何学C not do this, they instead did:

#include "LibRoot/blah.h"

So I did this and now MSVC cannot find this include file. How come it works on another MSVC based lib, but mine does not? Is there a certain flag that I must set or something?

Thanks


You need to add whatever directory LibRoot is in to the Additional Include Directories of the project's properties (on the C/C++ - General page).

0

精彩评论

暂无评论...
验证码 换一张
取 消