user195257
user195257

Reputation: 3316

Visual studio 2010 no such file

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

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>

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

Upvotes: 1

Views: 5534

Answers (1)

Rahul
Rahul

Reputation: 77926

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

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

As per the given solution:

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

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.

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

EDIT:

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:

Changes in VS 2010

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.

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).

Upvotes: 1

Related Questions