c++ - 如何在 Visual C++ 2010 中使用 C++ 库

标签 c++ visual-c++-2010

<分区>

Possible Duplicate:
visual c++: #include files from other projects in the same solution

我是 C++ 之类的新手。在这个项目中,我使用的是 Visual C++ 2010 Express。我正在尝试使用 parserlib 。下载了文件,甚至打开了示例。现在我尝试创建一个空项目并且不知道如何包含它的文件......我尝试将 parserlib 放入“源文件”,并将其包含在内:

#include "parserlib/parserlib.hpp"
// OR
#include "parserlib.hpp"

两者均无效。我想我需要设置一些包含路径之类的?

最佳答案

  1. 右键单击该项目,然后选择“属性”。
  2. 选择配置属性->C/C++->常规。
  3. 在附加包含目录下设置路径。

然后包括使用:

#include "parselib.hpp"

您可以在这个堆栈问题中阅读详细答案:visual c++: #include files from other projects in the same solution

关于c++ - 如何在 Visual C++ 2010 中使用 C++ 库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12987386/

相关文章:

c++ - 警告 C4552 : '<' : operator has no effect; expected operator with side-effect

c++ - Visual C++ 2010 Express 中的 "Unresolved External"错误

visual-studio-2010 - 如何以编程方式创建空的 Visual C++ 项目?

c++ -\u0052\u0022 是否开始一个原始字符串?

c++ - 非虚函数可以等于0吗?

c++ - 通过指针访问 char*

c++ - 在此代码中应如何使用cin.ignore()函数?

C++ 在函数参数中使用 ** 指针不起作用

c++ - 实现二进制搜索猜谜游戏

c++ - 有没有办法在不包含 stdafx.h 的情况下使用 VC++ 2010?