Visual Studio 2010 没有这样的文件 [英] Visual studio 2010 no such file

查看:19
本文介绍了Visual Studio 2010 没有这样的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用字体库时遇到一些问题.我收到当前错误

having some problems using a font library. Im getting the current error

c:\users\taylor\documents\uni\win32opengl2template\freetype.h(5): fatal error C1083: Cannot open include file: 'ft2build.h': No such file or directory

在 freetype.h 中找不到以下所有内容

In freetype.h all of the following cant be found

//FreeType Headers
#include <ft2build.h>
#include <freetype/freetype.h>
#include <freetype/ftglyph.h>
#include <freetype/ftoutln.h>
#include <freetype/fttrigon.h>

但是,当我像这样直接链接它们时,它可以工作.

However when i link them directly like this, it works.

#include <c:\users\taylor\documents\uni\win32opengl2template\ft2build.h>

所以我猜我需要在 VS 中更改某种目录设置,但我不知道该怎么做??

So im guessing there is some sort of directory setting i need to change in VS, but i have no idea how to??

推荐答案

检查这个线程一次...看起来像你想要的

Check this thread once ... looks like what you want

http:///social.msdn.microsoft.com/Forums/en-US/gametechnologiesdirectx101/thread/5d24f4af-a827-416f-b2e9-5bde479d6925/

根据给定的解决方案:

通常,如果您在安装 IDE 后安装 SDK,那么它会相应地进行配置.

Usually, if you install the SDK after you install your IDE then it will configure it accordingly.

在 Visual C++ 中,转到工具"菜单,选择选项".展开左侧的项目和解决方案"节点.选择VC++目录".您应该会看到一个包含文件夹列表的窗格...使用右上角的下拉菜单(显示...的目录")为包括Files".从您的 SDK 安装中添加 \include 文件夹.您可能还想将 \lib 文件夹添加到库文件"部分.

In Visual C++, go to the "Tools" menu, select "Options". Expand the "Projects and Solutions" node on the left-hand side. Select "VC++ Directories". You should see a pane with a list of folders... Use the drop-down in the top right ("Show directories for..") to be "Include Files". Add the \include folder from your SDK installation. You might want to add the \lib folder to the "Library Files" section as well.

点击ok",你就可以开始了!

Click "okay" and you're ready to go!

看起来上面的设置只适用于 VS 2005/2008 而不适用于 VS 2010.在 VS 2010 中这已经改变了.取自 VC++ 目录,上面写着:

Looks like the above settings works only in VS 2005/2008 and not in VS 2010. In VS 2010 this have changed. Taken from VC++ Directories and it says:

在 VS 2010 中使用 VC++ 目录时,您首先会注意到它们似乎已经消失了.当您转到工具"->选项"窗口并查看项目"和解决方案"时,您会看到该窗口与上面的屏幕截图非常相似——只有 VC++ 目录不见了.

The first thing you’ll notice in VS 2010 when working with VC++ Directories is that they appear to have disappeared. When you go to the Tools->Options window and look in Project and Solutions, you’ll see the window looks very similar to the screenshot above – only VC++ Directories is gone.

但是,如果您在 IDE 中调出一个 VC++ 项目并打开项目属性窗口(右键单击项目节点并选择属性),您会注意到一个名为 VC++ 目录的规则(规则是属性页窗口左窗格上的选择树)并且您看到的值与您将获得的默认值相同来自 VS 2008.此外,您可以在相同的方式作为任何其他项目属性(包括使用宏编辑器作为显示 - 在 VS 2008 中是不可能的).

However, if you bring up a VC++ project in the IDE and open the project properties window (right-click on the project node and select Properties), you will notice a Rule called VC++ Directories (Rules are the tree of selections on the left pane of the property page window) and that the values you see are the same defaults that you would get from VS 2008. Additionally, you can edit these properties in the same way as any other project property (including using the macro editor as shown – something not possible in VS 2008).

这篇关于Visual Studio 2010 没有这样的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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