Visual Studio不接受包含目录 [英] Visual Studio does not honor include directories

查看:103
本文介绍了Visual Studio不接受包含目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这种情况下,我遇到过很多次,当涉及到libheader source files时,Visual Studio不尊重其他包含目录.例如,我刚刚下载了MyGUI源代码,并确保包含目录正确.我什至把它们放在绝对路径上,Visual Studio仍然抱怨找不到特定的头文件.

I have been in this situation quite a few times where visual studio does not honor the Additional Include Directories when it comes to lib and header source files. For example, I just downloaded MyGUI source code and made sure the include directories were correct. I even put them to absolute paths, Visual Studio still complained that it could not find specific header files.

有人在项目中经历过相同的事情吗?如果是,是否有解决此问题的方法?Blockquote

Does anybody experience the same thing with projects, and if so, is there a solution to this problem?Blockquote

编辑:抱歉,我无法完全解释.我知道库和源文件具有不同的包含目录.我收到的项目的其他包含目录"和其他库目录"具有正确的目录路径,但是Visual Studio仍然无法正确识别它们.我可以右键单击并在Visual Studio中打开头文件,但是在编译时仍然抱怨找不到所需的头文件.我经常使项目依赖于我自己编写的框架,因此我对如何设置依赖项非常熟悉.但是,这似乎是第二次发生这种情况了.我不记得上次尝试编译哪个第三方项目,但是Visual Studio只是拒绝相信Additional Include Directories路径是它应在其中查找头文件的位置.我不确定如何提供此特定库(MyGUI)的完整详细信息,但是我可以将您指向一个网站,您可以在该网站上下载它以尝试查看它是否能够找到项目中包含的头文件(如果它不编译,那很好,这可能是由于附加的依赖关系,但是它至少应该能够在common文件夹中找到文件,尤其是当我将绝对路径放在Additional Include Directories中时)

My apologies for not being able to explain fully. I know that the library and source files have different include directories. The project that I received had correct directory paths for the Additional Include Directories and Additional Library Directories but Visual Studio still failed to recognize them properly. I can right click and open the header file within Visual Studio but when compiling it still complains it cannot find the required header files. I regularly make projects relying on a framework I myself programmed, so I am quite familiar with how to set up dependencies. This is however the second time this seems to be happening. I don't recall which 3rd party project I was trying to compile last time, but Visual Studio simply refused to believe that the Additional Include Directories paths is where it should look for the header files. I am not sure how to give the complete details of this particular library (MyGUI) but I can point you to the website where you can download it to try and see if it is able to find the header files that are included in the project (if it doesn't compile, that is fine, and it is probably because of additional dependencies, but it should at least be able to find files in the common folder, especially when I put absolute paths in Additional Include Directories)

推荐答案

我发现(迷迷糊糊)在解决方案上(我认为).它与操作系统施加的字符数限制有关.虽然限制应该是260,但对我来说,它在150以下,

I have found (stumbled) on the solution (I think). It has something to do with the character limit imposed by the OS. Although the limit should be 260, for me it falls in the below 150, see this discussion and links to it. I downloaded and unzipped the file to C:\Users\MyUserName\My Documents\Downloads\Downloads From Chrome\MyGui3.0...[and so on]. I learned quite some time ago not to try to compile projects under such long paths, but this time it completely slipped my mind as VS did not give me a warning at all and pointed me in the wrong direction. Anyway, cutting and pasting the project to D:\ fixed the issue. I am not going to checkmark the answer however until someone confirms this.

这篇关于Visual Studio不接受包含目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆