Changing framework for Visual Studio 2008

For Windows specific issues

Changing framework for Visual Studio 2008

Postby Mikey » Tue May 29, 2012 4:47 pm

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:
Code: Select all
#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.
Mikey
JUCE UberWeenie
 
Posts: 235
Joined: Fri Feb 20, 2009 7:36 pm
Location: The Rockies

Re: Changing framework for Visual Studio 2008

Postby otristan » Tue May 29, 2012 4:52 pm

You need the Windows platform SDK not .Net

http://www.microsoft.com/en-us/download ... px?id=3138
otristan
JUCE UberWeenie
 
Posts: 657
Joined: Sat Mar 03, 2007 3:03 pm
Location: Paris

Re: Changing framework for Visual Studio 2008

Postby Mikey » Tue May 29, 2012 6:40 pm

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

http://www.microsoft.com/en-us/download ... px?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).
Mikey
JUCE UberWeenie
 
Posts: 235
Joined: Fri Feb 20, 2009 7:36 pm
Location: The Rockies

Re: Changing framework for Visual Studio 2008

Postby AlexY » Wed May 30, 2012 1:24 am

AlexY
JUCE Geek
 
Posts: 20
Joined: Wed Apr 11, 2012 10:33 pm

Re: Changing framework for Visual Studio 2008

Postby Mikey » Wed May 30, 2012 1:40 am

AlexY wrote:Why not install .Net framework 2.0?
http://www.microsoft.com/en-us/download ... 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.
Mikey
JUCE UberWeenie
 
Posts: 235
Joined: Fri Feb 20, 2009 7:36 pm
Location: The Rockies

Re: Changing framework for Visual Studio 2008

Postby jrlanglois » Wed May 30, 2012 2:13 am

[Visual Studio 2012] [Xcode 4.6] [x64 Ubuntu 12.10 - NetBeans 7.3]
[latest JUCE tip] [My JUCE Fork] [FriendlyBinaryBuilder]
User avatar
jrlanglois
JUCE UberWeenie
 
Posts: 604
Joined: Fri Aug 12, 2011 5:54 pm
Location: Ottawa, Ontario, Canada

Re: Changing framework for Visual Studio 2008

Postby ckk » Wed May 30, 2012 6:32 am

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
ckk
JUCE UberWeenie
 
Posts: 218
Joined: Thu May 20, 2010 7:43 pm

Re: Changing framework for Visual Studio 2008

Postby Mikey » Wed May 30, 2012 11:41 am


Thanks, but I'd already installed it.
Mikey
JUCE UberWeenie
 
Posts: 235
Joined: Fri Feb 20, 2009 7:36 pm
Location: The Rockies

Re: Changing framework for Visual Studio 2008

Postby Mikey » Wed May 30, 2012 11:48 am

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.
Mikey
JUCE UberWeenie
 
Posts: 235
Joined: Fri Feb 20, 2009 7:36 pm
Location: The Rockies

Re: Changing framework for Visual Studio 2008

Postby lucem » Wed May 30, 2012 7:11 pm

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.
lucem
JUCE Obsessive
 
Posts: 60
Joined: Wed Jul 13, 2011 1:24 pm
Location: Iserlohn, Germany

Re: Changing framework for Visual Studio 2008

Postby cpr » Wed May 30, 2012 9:14 pm

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).
User avatar
cpr
JUCE UberWeenie
 
Posts: 131
Joined: Fri Apr 25, 2008 11:49 pm

Re: Changing framework for Visual Studio 2008

Postby Mikey » Fri Jun 08, 2012 10:20 pm

I meant to get back to the people who offered help to me. It turned out that it was a registry issue (is there anything left to say about the registry?). For whatever reason, none of my installs and reinstalls saw fit to create a couple of HKEY_LOCAL_USER keys that were necessary. Once I created those keys, everything was hunky-dory.

Thanks again to those who took the time to offer their suggestions.
Mikey
JUCE UberWeenie
 
Posts: 235
Joined: Fri Feb 20, 2009 7:36 pm
Location: The Rockies

Re: Changing framework for Visual Studio 2008

Postby ldjsnape » Mon Jun 11, 2012 5:17 pm

Here is the Microsoft bug report:

http://blogs.msdn.com/b/windowssdk/archive/2008/06/30/winsdk-bug-notification-sdk-config-tool-appears-to-work-but-fails.aspx

Changing the SDK value in the Windows SDK Configuration Tool worked for me.
Luke
ldjsnape
JUCE Weenie
 
Posts: 16
Joined: Fri May 20, 2011 3:36 pm

Re: Changing framework for Visual Studio 2008

Postby haydxn » Wed Jun 20, 2012 10:40 am

I had this problem the other day too - I use XCode mostly now, and fancied testing a win build. It always used to work, but now didn't!
A quick search showed that I already did have the right SDK installed, and the file it was looking for existed. I just added the SDK's include folder to the VC++ directories and it worked fine.

F W I W
xh
User avatar
haydxn
JUCE UberWeenie
 
Posts: 1184
Joined: Sun Apr 10, 2005 2:46 pm
Location: Manchester, UK

Re: Changing framework for Visual Studio 2008

Postby acn » Thu Jul 19, 2012 6:45 am

Hey Friends....

I am encountered with same error and problem, but I am on windowXP(X86) and My visual studio is 2005, Any idea how this problem can be solved in such environment ?

Thanks friends....
User avatar
acn
JUCE Obsessive
 
Posts: 92
Joined: Thu Sep 15, 2011 8:16 am
Location: India

Next

Return to Windows

Who is online

Users browsing this forum: No registered users and 1 guest