开发者

Problem with MSVC includes

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜