Changing framework for Visual Studio 2008

16 posts / 0 new
Last post
Mikey
Offline
Last seen: 2 weeks 4 days ago
Joined: 20 Feb 2009 - 18:36
Changing framework for Visual Studio 2008

I haven't done much Windows work since the days of NT 4. The majority of my work since then has been in XCode and various embedded worlds. My time away from Windows has been pleasant. But I must return for some work. Seems like the best place to start would be building the Introjucer, since the project is already there.

I've got Win7 with Visual Studio 2008. My first effort to build got me to this error in juce_graphics.cpp:

 #if JUCE_USE_DIRECTWRITE
  /* If you hit a compile error trying to include these files, you may need to update
     your version of the Windows SDK to the latest one. The DirectWrite and Direct2D
     headers are in the version 7 SDKs.
  */
  #include <d2d1.h>
  #include <dwrite.h>
 #endif

So I went out and grabbed the Net 3.51 and Net 4.00 SDKs, along with assorted service packs that were needed for Visual Studio 2008. Spent hours installing. I still have the same failure as before: an error bemoaning the absence of d2d1.h. I've gone digging through the project properties and found that the selection for Targeted Framework says .NET Framework 2.0. The choice is greyed out. I've gone digging through forums and found various possible corrections, but none seem to point to options that actually exists.

I'm sure this sounds like a rookie mistake and I suppose it is. But if anyone could point me toward a solution, I'll gladly accept any insults that come along with it.

otristan
Offline
Last seen: 1 day 9 hours ago
Joined: 3 Mar 2007 - 14:03
Re: Changing framework for Visual Studio 2008

You need the Windows platform SDK not .Net

http://www.microsoft.com/en-us/download/details.aspx?id=3138

Olivier

Mikey
Offline
Last seen: 2 weeks 4 days ago
Joined: 20 Feb 2009 - 18:36
Re: Changing framework for Visual Studio 2008

otristan wrote:
You need the Windows platform SDK not .Net

http://www.microsoft.com/en-us/download/details.aspx?id=3138

Yeah, that was one of the other things I'd installed, along with the Visual Studio Service Pack 1. Just to be sure, I applied them all again. I went back through my update history and discovered that I'd actually installed all the SDKs weeks ago. So I shouldn't have encountered this problem in the first place. Perhaps there's something in the way the Introjucer solution/project are put together (nothing is write-protected, by the way).

AlexY
Offline
Last seen: 1 year 3 months ago
Joined: 11 Apr 2012 - 22:33
Re: Changing framework for Visual Studio 2008
Mikey
Offline
Last seen: 2 weeks 4 days ago
Joined: 20 Feb 2009 - 18:36
Re: Changing framework for Visual Studio 2008

AlexY wrote:
Why not install .Net framework 2.0?
http://www.microsoft.com/en-us/download/details.aspx?id=19

I'm running Win7 as 64 bits, and I can't install 2.0 on 64 bit.

This raises the question: is this build doomed to fail on a 64-bit system? I'm so used to Mac software running smoothly with a mix of 32/64 bit that I forget Windows is considerably cruder in that regard.

jrlanglois
Offline
Last seen: 1 day 3 hours ago
Joined: 12 Aug 2011 - 17:54
Re: Changing framework for Visual Studio 2008

[Visual Studio 2012] [Xcode 5.0.2] [NetBeans 7.3]
[latest JUCE tip] [C++ File Tools] [FriendlyBinaryBuilder]

ckk
Offline
Last seen: 4 days 17 hours ago
Joined: 20 May 2010 - 19:43
Re: Changing framework for Visual Studio 2008

Are you using the express edition?
If so, there is a bug in the SDK installation which prevents VS from using the newer SDK. Have a look here for further information.

As an alternative, you could simply disable DirectWrite, which isn't really necessary.

Chris

Mikey
Offline
Last seen: 2 weeks 4 days ago
Joined: 20 Feb 2009 - 18:36
Re: Changing framework for Visual Studio 2008


Thanks, but I'd already installed it.
Mikey
Offline
Last seen: 2 weeks 4 days ago
Joined: 20 Feb 2009 - 18:36
Re: Changing framework for Visual Studio 2008

ckk wrote:
Are you using the express edition?
If so, there is a bug in the SDK installation which prevents VS from using the newer SDK. Have a look here for further information.

As an alternative, you could simply disable DirectWrite, which isn't really necessary.
Chris

I'm using the so-called Professional version, actually trying to build 32-bit. Nonetheless, that looks like a useful article to keep in the pocket. Thanks for the DirectWrite tip. I think I'm going to try this under XP and see if I can reduce the problem space.

lucem
Offline
Last seen: 1 month 1 week ago
Joined: 13 Jul 2011 - 13:24
Re: Changing framework for Visual Studio 2008

Just to be sure, have you properly set up the search paths for the Visual C++ 2008 compiler?
Make sure the Windows SDK is the top of the list in both include and library search path lists.
Since the installer doesn't do that on it's own, you need to do that yourself.

cpr
cpr's picture
Offline
Last seen: 1 hour 29 min ago
Joined: 25 Apr 2008 - 23:49
Re: Changing framework for Visual Studio 2008

What lucem just said. After the install you need to configure the Visual Studio include paths to point at those directories (this is how to get to it from VS2005, Tools/Options/Projects and Solutions/VC++ Directories).

Pages